@rubenlangeweg/mero-ui 0.7.0 → 0.9.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.
- package/CHANGELOG.md +25 -0
- package/README.md +25 -4
- package/agent-docs/components/accordion.md +1 -1
- package/agent-docs/components/action-bar.md +1 -1
- package/agent-docs/components/action-button.md +32 -1
- package/agent-docs/components/agenda.md +1 -1
- package/agent-docs/components/alert-dialog.md +1 -1
- package/agent-docs/components/alert.md +1 -1
- package/agent-docs/components/app-layout.md +1 -1
- package/agent-docs/components/area-chart.md +1 -1
- package/agent-docs/components/aura.md +1 -1
- package/agent-docs/components/autocomplete.md +1 -1
- package/agent-docs/components/avatar-group.md +1 -1
- package/agent-docs/components/avatar.md +1 -1
- package/agent-docs/components/badge.md +1 -1
- package/agent-docs/components/bar-chart.md +1 -1
- package/agent-docs/components/breadcrumbs.md +1 -1
- package/agent-docs/components/browser-mockup.md +1 -1
- package/agent-docs/components/button-group.md +1 -1
- package/agent-docs/components/button.md +32 -1
- package/agent-docs/components/calendar.md +3 -3
- package/agent-docs/components/card.md +56 -1
- package/agent-docs/components/carousel.md +1 -1
- package/agent-docs/components/cell-color-picker.md +1 -1
- package/agent-docs/components/cell-select.md +1 -1
- package/agent-docs/components/cell-slider.md +1 -1
- package/agent-docs/components/cell-switch.md +1 -1
- package/agent-docs/components/chain-of-thought.md +1 -1
- package/agent-docs/components/chart-tooltip.md +1 -1
- package/agent-docs/components/chat-attachment.md +1 -1
- package/agent-docs/components/chat-conversation.md +1 -1
- package/agent-docs/components/chat-list-view.md +1 -1
- package/agent-docs/components/chat-loader.md +1 -1
- package/agent-docs/components/chat-message-actions.md +1 -1
- package/agent-docs/components/chat-message.md +1 -1
- package/agent-docs/components/chat-source.md +1 -1
- package/agent-docs/components/chat-tool.md +1 -1
- package/agent-docs/components/checkbox-button-group.md +1 -1
- package/agent-docs/components/checkbox-group.md +1 -1
- package/agent-docs/components/checkbox.md +1 -1
- package/agent-docs/components/chip.md +1 -1
- package/agent-docs/components/close-button.md +1 -1
- package/agent-docs/components/code-block.md +1 -1
- package/agent-docs/components/code-mockup.md +1 -1
- package/agent-docs/components/color-area.md +1 -1
- package/agent-docs/components/color-field.md +1 -1
- package/agent-docs/components/color-picker.md +1 -1
- package/agent-docs/components/color-slider.md +1 -1
- package/agent-docs/components/color-swatch.md +1 -1
- package/agent-docs/components/combo-box.md +1 -1
- package/agent-docs/components/command-menu.md +1 -1
- package/agent-docs/components/command.md +1 -1
- package/agent-docs/components/composed-chart.md +1 -1
- package/agent-docs/components/context-menu.md +1 -1
- package/agent-docs/components/countdown.md +1 -1
- package/agent-docs/components/data-grid.md +1 -1
- package/agent-docs/components/date-field.md +1 -1
- package/agent-docs/components/date-picker.md +1 -1
- package/agent-docs/components/date-range-picker.md +1 -1
- package/agent-docs/components/description-list.md +30 -0
- package/agent-docs/components/description.md +1 -1
- package/agent-docs/components/diff.md +1 -1
- package/agent-docs/components/disclosure-group.md +1 -1
- package/agent-docs/components/disclosure.md +1 -1
- package/agent-docs/components/dock.md +1 -1
- package/agent-docs/components/drawer.md +83 -1
- package/agent-docs/components/drop-zone.md +1 -1
- package/agent-docs/components/dropdown.md +1 -1
- package/agent-docs/components/emoji-picker.md +1 -1
- package/agent-docs/components/emoji-reaction-button.md +1 -1
- package/agent-docs/components/empty-state.md +36 -4
- package/agent-docs/components/error-message.md +1 -1
- package/agent-docs/components/fab.md +1 -1
- package/agent-docs/components/field-error.md +1 -1
- package/agent-docs/components/fieldset.md +45 -1
- package/agent-docs/components/file-input.md +1 -1
- package/agent-docs/components/file-tree.md +1 -1
- package/agent-docs/components/filter-chips.md +1 -1
- package/agent-docs/components/floating-toc.md +1 -1
- package/agent-docs/components/footer.md +1 -1
- package/agent-docs/components/form.md +155 -1
- package/agent-docs/components/hero.md +1 -1
- package/agent-docs/components/holo-card.md +1 -1
- package/agent-docs/components/hover-card.md +1 -1
- package/agent-docs/components/hover-gallery.md +1 -1
- package/agent-docs/components/indicator.md +1 -1
- package/agent-docs/components/inline-select.md +1 -1
- package/agent-docs/components/input-group.md +1 -1
- package/agent-docs/components/input-otp.md +1 -1
- package/agent-docs/components/input.md +1 -1
- package/agent-docs/components/item-card-group.md +1 -1
- package/agent-docs/components/item-card.md +1 -1
- package/agent-docs/components/join.md +1 -1
- package/agent-docs/components/joined-filter.md +1 -1
- package/agent-docs/components/kanban.md +1 -1
- package/agent-docs/components/kbd.md +32 -1
- package/agent-docs/components/kpi-group.md +1 -1
- package/agent-docs/components/kpi.md +1 -1
- package/agent-docs/components/label.md +1 -1
- package/agent-docs/components/line-chart.md +1 -1
- package/agent-docs/components/link.md +1 -1
- package/agent-docs/components/list-box.md +1 -1
- package/agent-docs/components/list-view.md +1 -1
- package/agent-docs/components/live-progress.md +34 -1
- package/agent-docs/components/map.md +1 -1
- package/agent-docs/components/markdown.md +1 -1
- package/agent-docs/components/mask.md +1 -1
- package/agent-docs/components/megamenu.md +1 -1
- package/agent-docs/components/menu-button.md +35 -1
- package/agent-docs/components/menu.md +1 -1
- package/agent-docs/components/meter.md +1 -1
- package/agent-docs/components/modal.md +1 -1
- package/agent-docs/components/native-select.md +1 -1
- package/agent-docs/components/navbar.md +1 -1
- package/agent-docs/components/number-field.md +1 -1
- package/agent-docs/components/number-stepper.md +1 -1
- package/agent-docs/components/number-value.md +1 -1
- package/agent-docs/components/page-header.md +69 -0
- package/agent-docs/components/pagination.md +1 -1
- package/agent-docs/components/phone-mockup.md +1 -1
- package/agent-docs/components/pie-chart.md +1 -1
- package/agent-docs/components/popover.md +1 -1
- package/agent-docs/components/pressable-feedback.md +1 -1
- package/agent-docs/components/progress-bar.md +1 -1
- package/agent-docs/components/progress-circle.md +1 -1
- package/agent-docs/components/prompt-input.md +1 -1
- package/agent-docs/components/prompt-suggestion.md +1 -1
- package/agent-docs/components/radar-chart.md +1 -1
- package/agent-docs/components/radial-chart.md +1 -1
- package/agent-docs/components/radio-button-group.md +1 -1
- package/agent-docs/components/radio-group.md +1 -1
- package/agent-docs/components/range-calendar.md +1 -1
- package/agent-docs/components/rating.md +1 -1
- package/agent-docs/components/resizable.md +1 -1
- package/agent-docs/components/rich-text-editor.md +1 -1
- package/agent-docs/components/scroll-shadow.md +1 -1
- package/agent-docs/components/search-field.md +43 -1
- package/agent-docs/components/segment.md +1 -1
- package/agent-docs/components/select.md +1 -1
- package/agent-docs/components/separator.md +1 -1
- package/agent-docs/components/sheet.md +1 -1
- package/agent-docs/components/sidebar.md +1 -1
- package/agent-docs/components/skeleton.md +1 -1
- package/agent-docs/components/slider.md +1 -1
- package/agent-docs/components/sortable-table.md +1 -1
- package/agent-docs/components/spinner.md +1 -1
- package/agent-docs/components/stack.md +1 -1
- package/agent-docs/components/status.md +1 -1
- package/agent-docs/components/stepper.md +1 -1
- package/agent-docs/components/surface.md +1 -1
- package/agent-docs/components/swap.md +1 -1
- package/agent-docs/components/switch.md +1 -1
- package/agent-docs/components/table.md +58 -1
- package/agent-docs/components/tabs.md +24 -1
- package/agent-docs/components/tag-group.md +1 -1
- package/agent-docs/components/text-area.md +1 -1
- package/agent-docs/components/text-field.md +1 -1
- package/agent-docs/components/text-rotate.md +1 -1
- package/agent-docs/components/text-shimmer.md +1 -1
- package/agent-docs/components/theme-controller.md +1 -1
- package/agent-docs/components/time-field.md +1 -1
- package/agent-docs/components/timeline.md +1 -1
- package/agent-docs/components/toast.md +1 -1
- package/agent-docs/components/toggle-button-group.md +1 -1
- package/agent-docs/components/toggle-button.md +1 -1
- package/agent-docs/components/toolbar.md +1 -1
- package/agent-docs/components/tooltip.md +1 -1
- package/agent-docs/components/trend-chip.md +1 -1
- package/agent-docs/components/typed-confirmation.md +1 -1
- package/agent-docs/components/typography.md +24 -1
- package/agent-docs/components/validator.md +1 -1
- package/agent-docs/components/visually-hidden.md +27 -0
- package/agent-docs/components/widget.md +1 -1
- package/agent-docs/components/window-mockup.md +1 -1
- package/agent-docs/llms-components.txt +989 -194
- package/agent-docs/llms-full.txt +1079 -206
- package/agent-docs/llms-patterns.txt +91 -13
- package/agent-docs/llms.txt +5 -2
- package/package.json +4 -1
- package/ui/insight-charts.mjs +1 -1
- package/ui/insight-markdown.mjs +1 -1
- package/ui/mero-collections.css +1 -7
- package/ui/mero-collections.js +1 -1
- package/ui/mero-composition.css +1 -1
- package/ui/mero-composition.js +1 -1
- package/ui/mero-forms.js +415 -27
- package/ui/mero-gallery.css +1 -1
- package/ui/mero-gallery.js +1 -1
- package/ui/mero-insights.css +1 -1
- package/ui/mero-insights.js +1 -1
- package/ui/mero-inventory.css +1 -1
- package/ui/mero-inventory.js +1 -1
- package/ui/mero-layouts.css +1 -4
- package/ui/mero-live.js +25 -4
- package/ui/mero-workspace.css +1 -1
- package/ui/mero-workspace.js +1 -1
- package/ui/mero.css +104 -5
- package/ui/mero.js +220 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.9.0 · 24 November 2026
|
|
4
|
+
|
|
5
|
+
- **Stability:** the README now states the versioning policy for 0.x. The public names in `ui/` (`data-mero-*` attributes, `mero:*` events, `window.MeroUI` methods, `Mero-*` headers, `--mero-*` properties and the chart and Markdown exports) are recorded in `test/api-surface.json`, and a test fails when one is removed or renamed. From this release, changelog bullets that start with **Deprecated:** or **Breaking:** are the ones to read before an upgrade.
|
|
6
|
+
- **htmx pin:** Mero is tested against exactly htmx 4.0.2. `htmx.org` is an exact devDependency, and a test fails unless the htmx build the catalog and the browser tests load is byte for byte that release. The README install line names `htmx.org@4.0.2`; later 4.x releases are expected to work but are not tested until the pin moves.
|
|
7
|
+
- **Scripted swaps:** `htmx.swap({ text, target, swap })` without a `request` no longer raises an uncaught error from the re-read guard. The swap itself always happened; only the error is gone.
|
|
8
|
+
- **State events:** `mero:tab` fires on the newly selected tab, with `{ tab, panel }`, when a person changes the tab by click, arrow key, Home or End. `mero:toggle` fires on a `data-mero-toggle` button, with `{ pressed }`, after a click flips it. Both bubble and fire after the attributes are written, so a host script can follow these components without reading Mero-managed attributes. Neither fires at load or from `MeroUI.init()`. To follow a combobox choice, listen for the native `change` event on its input.
|
|
9
|
+
- **Alpine:** a browser test runs Mero next to Alpine 3.14.8 (the floor) and 3.17.5 (the current release, bumped by hand), with htmx's `hx-alpine-compat` extension, in both script orders. It covers Alpine listeners for `mero:selection`, `mero:tab`, `mero:toggle` and `mero:action`, `x-model.lazy` on a combobox, Alpine state and Mero re-initialising tabs across an `innerHTML` swap and a morph, and `MeroUI.init(el)` for tabs that `x-if` inserts. Nothing in `ui/` changed.
|
|
10
|
+
- **Reference:** two new sections, on the page and in the packed `agent-docs`. "State Mero owns" lists the native and ARIA state `mero.js`, `mero-forms.js` and `mero-live.js` write, per component, including the form-control values they set. "Headers" lists the five `Mero-*` headers with their direction and values. `data-mero-live-done` is now marked as set by Mero, and `MeroUI.toast` documents its `trigger` option. Documentation only; nothing in `ui/` changed.
|
|
11
|
+
- **Alpine reference:** a new "With Alpine or your own scripts" section in the reference, on the page and in the packed `agent-docs`, states only what the browser test asserts with Alpine 3.14.8 and 3.17.5: script order, listening for `mero:*` events, `mero:action` and its missing source identity, `x-model.lazy` on a combobox, htmx swaps and `MeroUI.init(el)` for markup Alpine inserts. The test gains one case: a value a script writes reaches `data-mero-dirty` and `data-mero-show-when` only after a bubbling `change`. The `mero-ui` skill points to the section. Nothing in `ui/` changed.
|
|
12
|
+
|
|
13
|
+
## 0.8.0 · 23 November 2026
|
|
14
|
+
|
|
15
|
+
- **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.
|
|
16
|
+
- **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.
|
|
17
|
+
- **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.
|
|
18
|
+
- **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.
|
|
19
|
+
- **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.
|
|
20
|
+
- **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.
|
|
21
|
+
- **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.
|
|
22
|
+
- **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.
|
|
23
|
+
- **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.
|
|
24
|
+
- **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.
|
|
25
|
+
- **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.
|
|
26
|
+
- **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.
|
|
27
|
+
|
|
3
28
|
## 0.7.0 · 23 November 2026
|
|
4
29
|
|
|
5
30
|
- 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
|
|
44
|
+
Install Mero UI and HTMX from npm.
|
|
45
45
|
|
|
46
46
|
```sh
|
|
47
|
-
npm install
|
|
47
|
+
npm install @rubenlangeweg/mero-ui htmx.org@4.0.2
|
|
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.
|
|
50
|
+
To skip the install, load a file straight from the tag, for example `https://cdn.jsdelivr.net/gh/rubenlangeweg/mero-ui@v0.9.0/ui/mero.css`.
|
|
51
51
|
|
|
52
|
-
Mero targets htmx 4
|
|
52
|
+
Mero targets htmx 4 and is tested against htmx 4.0.2; later 4.x releases are expected to work but are not tested until the pin moves. 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.9.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
|
|
|
@@ -86,6 +86,25 @@ Use the [theme studio](http://127.0.0.1:4173/themes) to try colors, fonts and ra
|
|
|
86
86
|
|
|
87
87
|
Media uses `mero-gallery` assets. Collections use `mero-collections`. Workspace controls use `mero-workspace`. Charts and conversation examples use `mero-insights`. Presentation utilities use `mero-composition`. Each pair comprises a stylesheet and a deferred script. Two optional server helpers render charts and a small Markdown subset. Import them as `@rubenlangeweg/mero-ui/charts` and `@rubenlangeweg/mero-ui/markdown`.
|
|
88
88
|
|
|
89
|
+
## Stability
|
|
90
|
+
|
|
91
|
+
Mero follows [semantic versioning](https://semver.org). Mero is 0.x and still young, so a minor release may break the public API. From 0.9.0 it never does so silently: the [changelog](CHANGELOG.md) marks every removal, rename or change in meaning as **Breaking:** in the release that makes it. Where it is cheap, a name is marked **Deprecated:** and keeps working for a release first. Patch releases do not break. Read those two bullets before each upgrade.
|
|
92
|
+
|
|
93
|
+
A test fails when one of these names disappears from `ui/`. The reviewed list is `test/api-surface.json`:
|
|
94
|
+
|
|
95
|
+
- `data-mero-*` attribute names
|
|
96
|
+
- `mero:*` event names
|
|
97
|
+
- `window.MeroUI` method names
|
|
98
|
+
- `Mero-*` request and response header names
|
|
99
|
+
- `--mero-*` custom property names
|
|
100
|
+
- the `renderChart` and `renderMarkdown` exports of `@rubenlangeweg/mero-ui/charts` and `@rubenlangeweg/mero-ui/markdown`
|
|
101
|
+
|
|
102
|
+
The same rule covers what the [reference](https://mero-ui.rubenlangeweg.com/docs/reference) and the catalog document, checked by review instead of a test: the element an event fires on, its `detail` keys and whether it bubbles, the values an attribute accepts, and the `.mero-*` classes in the catalog templates.
|
|
103
|
+
|
|
104
|
+
Mero's scripts set `--mero-shine-x`, `--mero-shine-y`, `--mero-tilt-x`, `--mero-tilt-y`, `--mero-diff-split`, `--mero-tooltip-shift` and `--mero-ws-first` while they run. The names are stable, so your CSS can read them, but do not set them yourself.
|
|
105
|
+
|
|
106
|
+
Everything else is internal and can change in any release: custom properties without the `mero-` prefix such as `--_height`, classes that no catalog template uses, and the `localStorage` and `sessionStorage` keys Mero writes (`mero-shortcuts`, `mero-focus:*` and `mero.split.*`). Do not read or write those keys.
|
|
107
|
+
|
|
89
108
|
## Upgrade from 0.4
|
|
90
109
|
|
|
91
110
|
Release 0.5 drops htmx 2. Load htmx 4, send `HX-Trigger` instead of `HX-Trigger-After-Settle`, and recopy templates that set `hx-*` attributes on a wrapper. The [changelog](CHANGELOG.md) lists every step.
|
|
@@ -129,6 +148,8 @@ npm run pack:ui
|
|
|
129
148
|
|
|
130
149
|
`npm version` stamps the new version into the first line of every script and stylesheet in `ui/`. After editing the version by hand, run `npm run banner`; a test fails while any file carries another version.
|
|
131
150
|
|
|
151
|
+
After adding a public name, run `node scripts/api-surface.mjs --write` and commit `test/api-surface.json`. `test/api-surface.test.mjs` fails while the snapshot and `ui/` differ, and names what was removed or added.
|
|
152
|
+
|
|
132
153
|
Each run uses two test files in parallel to keep browser sessions responsive on local machines. The npm package contains the UI assets. The downloadable preview includes the reference server and example routes. Browser checks and their environment options are documented next to the tests.
|
|
133
154
|
|
|
134
155
|
For a catalog-wide check, run `npm run audit:catalog -- --all`. The command starts an isolated server and emits a JSON result. To use existing installations, set `MERO_PLAYWRIGHT_MODULE`, `MERO_CHROME` and `MERO_AXE_PATH` to their local paths. The [quality review](docs/quality-review.md) records the issues fixed and the checks that still need a person.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Action Button
|
|
2
2
|
|
|
3
|
-
Mero UI 0.
|
|
3
|
+
Mero UI 0.9.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
|
# Button
|
|
2
2
|
|
|
3
|
-
Mero UI 0.
|
|
3
|
+
Mero UI 0.9.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.
|
|
3
|
+
Mero UI 0.9.0 · Date and time
|
|
4
4
|
|
|
5
5
|
Navigate months and choose a day on an inline calendar rendered by the server.
|
|
6
6
|
|
|
@@ -81,9 +81,9 @@ Template
|
|
|
81
81
|
id="calendar-day-22" aria-label="Sunday, November 22, 2026" aria-pressed="false"
|
|
82
82
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-22" hx-target="closest .mero-calendar" hx-swap="outerHTML">22</button></td></tr>
|
|
83
83
|
<tr><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
84
|
-
id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false"
|
|
84
|
+
id="calendar-day-23" aria-label="Monday, November 23, 2026" aria-pressed="false"
|
|
85
85
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-23" hx-target="closest .mero-calendar" hx-swap="outerHTML">23</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
86
|
-
id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false"
|
|
86
|
+
id="calendar-day-24" aria-label="Tuesday, November 24, 2026" aria-pressed="false" aria-current="date"
|
|
87
87
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-24" hx-target="closest .mero-calendar" hx-swap="outerHTML">24</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
88
88
|
id="calendar-day-25" aria-label="Wednesday, November 25, 2026" aria-pressed="false"
|
|
89
89
|
hx-get="/demo/catalog/calendar?month=2026-11&selected=2026-11-25" hx-target="closest .mero-calendar" hx-swap="outerHTML">25</button></td><td><button class="mero-button mero-button-sm mero-calendar-day mero-button-ghost" type="button"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Card
|
|
2
2
|
|
|
3
|
-
Mero UI 0.
|
|
3
|
+
Mero UI 0.9.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
|
+
````
|