moey-ui 0.1.0 → 0.3.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 +33 -3
- package/README.md +6 -4
- package/dist/ai-rules.md +6 -6
- package/dist/llms-full.txt +194 -60
- package/dist/moey.css +138 -59
- package/dist/moey.js +214 -67
- package/dist/moey.min.css +1 -1
- package/dist/moey.min.js +163 -53
- package/package.json +4 -3
- package/src/css/adapt.css +17 -5
- package/src/css/app.css +2 -3
- package/src/css/card.css +5 -2
- package/src/css/chat.css +1 -2
- package/src/css/datatable.css +4 -2
- package/src/css/dialog.css +14 -11
- package/src/css/form-layout.css +1 -2
- package/src/css/gallery.css +57 -15
- package/src/css/helpers.css +9 -0
- package/src/css/keyboard.css +2 -1
- package/src/css/list-group.css +4 -1
- package/src/css/palette.css +4 -3
- package/src/css/player.css +2 -3
- package/src/css/reboot.css +3 -3
- package/src/css/stretched-link.css +3 -2
- package/src/css/tabbar.css +5 -3
- package/src/css/table.css +1 -0
- package/src/css/tokens.css +3 -0
- package/src/js/moey.js +213 -66
package/CHANGELOG.md
CHANGED
|
@@ -2,18 +2,48 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to Moey. The format follows [Keep a Changelog](https://keepachangelog.com/), and versions follow [Semantic Versioning](https://semver.org/) (before 1.0, a minor version may change things that already exist).
|
|
4
4
|
|
|
5
|
-
## 0.
|
|
5
|
+
## 0.3.0 - 2026-11-28
|
|
6
|
+
|
|
7
|
+
- **Masonry is now Griddy.** `.griddy`, `data-moey-griddy`, `.griddy-dense`, `--mo-griddy-min` and `Moey.griddy()`, with its own docs page next to CSS Grid. The old names (`.masonry`, `.masonry-dense`, `--mo-masonry-min`, `data-moey-masonry`, `Moey.masonry()`) still work, and the old docs address forwards to the new page.
|
|
8
|
+
- **New: gliding.** `.griddy-glide` makes the items already on the page slide to their new place (.4s) when the layout changes: an item gets wider, the columns or the gap change, the window is resized, a filter hides some. An item placed for the first time goes straight to its spot, so new items never fly in from a corner. Griddy now also lays out again when a class changes the columns, the gap or an item's width, and when fonts arrive.
|
|
9
|
+
- **New: more ways to arrive.** `data-moey-enter` takes a value: `pop` (grows from nothing, 55ms apart), `rise`, `drop`, `fade`, `zoom`, `slide`, `flip`, `blur` or `none`. No value is today's fade up. `data-moey-enter-first` makes the items already on the page arrive too, `Moey.enter(list, items?)` plays it again, and `--mo-enter-stagger` sets the wait between items. Items appended by any script arrive, not only Moey's infinite scroll.
|
|
10
|
+
- **Infinite scroll: `data-moey-infinite="once"`** shows the Load more button the first time, then loads by itself (up to `data-moey-infinite-auto` loads, then the button again). `data-moey-infinite-auto="all"` never stops, and `data-moey-infinite-more` changes the button's words.
|
|
11
|
+
- **The Load more button stays in place while loading**, with a spinner and "Loading…" inside it, instead of being replaced by a spinner, so nothing on the page jumps. If the button goes away after a click, keyboard focus moves to the first new item.
|
|
12
|
+
- **Fixed: `data-moey-infinite="button"` always waits for the button**, as documented. One click used to turn on automatic loading for 3 more pages.
|
|
13
|
+
- **Dialogs, drawers and sheets close smoothly.** While closing, their parts used to fall out of their top-to-bottom layout into one row for a moment, so the content jumped and flickered. They now keep their exact size and layout until they're gone, and a dialog closes with a plain fade instead of shrinking.
|
|
14
|
+
- **Lighter scrolling: no blur behind floating bars by default.** The app header, tab bar, sticky form buttons and chat day labels are now slightly see-through (97%, the new `--mo-glass` setting) instead of frosted, and the video play button is a solid dark circle. A blur is redrawn every time the page moves behind it, which costs smoothness and battery on older phones.
|
|
15
|
+
- **New: `.frosted`** brings the frosted-glass look back on any of those bars, or on anything with a background. `.navbar-blur` still does the same for the navbar.
|
|
16
|
+
- **Embeds are generic: Moey no longer knows about any video site.** The lightbox has a new `data-type="embed"` for any video player's embed address (shown in a 16:9 frame), and click-to-load embeds (`data-moey-embed`) load `data-src` (else `href`) exactly as given. **Changed:** YouTube and Vimeo links are no longer recognized or rewritten; use the site's embed address with `data-type="embed"` in the lightbox, or in `data-src` for an embed, with the site's own options (autoplay, privacy mode) in the address.
|
|
17
|
+
- **Dialogs open faster.** The 2px blur behind dialogs, drawers, sheets and the command palette is gone (the dim stays). It was barely visible, but it stalled the first opening in a browser session by about 0.1s and made every frame of the animation heavier: the first opening's slowest frame went from 146ms to 49ms, later ones from 28ms to 21ms.
|
|
18
|
+
- **The command palette closes smoothly too**, with the same plain fade and no reflow.
|
|
19
|
+
- **A flush list straight in a card or dialog lines up.** A `.list-group-flush` placed directly in a `.card` (no `.card-body` around it), or directly in a dialog, drawer or sheet, had no side padding, so its rows touched the edges. It now gets the card's or dialog's padding and lines up with the title.
|
|
20
|
+
- **Data tables, expandable rows:** the detail panel is inset evenly (it had no space above it).
|
|
21
|
+
- **Data tables, grouped rows:** no empty strip between the header and the first group. Group headers now stick at the header's real height instead of a guessed 44px.
|
|
22
|
+
- **Data tables, checkboxes with a fixed first column:** the name column's header stays above the rows scrolling under it, and the name column sits flush against the checkbox column, with no gap showing other columns through.
|
|
23
|
+
- **Sortable headers:** right-aligned ones (Total, Price) no longer sit 2px higher than the others.
|
|
24
|
+
- **Phone sheets from menus, selects and pickers slide away.** On phones they used to vanish in one frame when closed; now they slide back down at full size, the reverse of how they open.
|
|
25
|
+
|
|
26
|
+
## 0.2.0 - 2026-11-26
|
|
27
|
+
|
|
28
|
+
- **Masonry places items exactly.** Each item gets its own position (the shortest column so far) instead of 1px grid rows. It measures the real layout size, so zoom, scaling or an entrance animation no longer makes items overlap; gaps stay exact on long pages; and very long feeds work in every browser (Firefox stops 1px grid rows at about 10,000px).
|
|
29
|
+
- **New items glide in:** `data-moey-enter` (`="fade"`, `="zoom"`) on any list or grid animates items added later, such as infinite scroll and "Load more". Items that only move don't animate.
|
|
30
|
+
- **`.dialog-fullscreen-phone`:** a normal dialog on larger screens, the whole screen on phones instead of a bottom sheet.
|
|
31
|
+
- **Page-wide dialog colors:** `--mo-dialog-bg` and the new `--mo-dialog-fg` can be set on `:root` and every dialog, drawer and sheet follows (before, each dialog set its own `--mo-dialog-bg`, so a page-level value was ignored).
|
|
32
|
+
- **Stat tiles fit small phones.** Two to a row at 280px, the value no longer gets cut off and the icon no longer hangs over the next tile: the value scales down a little on small screens, and the icon moves under the label when they don't fit side by side.
|
|
33
|
+
- **Smooth scrolling only for in-page links.** `html` no longer has `scroll-behavior: smooth`; moey.js turns it on just for a click on a `#link`. Scripts that scroll the page (`scrollTo`, `scrollIntoView`) land at once again.
|
|
34
|
+
|
|
35
|
+
## 0.1.0 - 2026-11-24
|
|
6
36
|
|
|
7
37
|
The first release.
|
|
8
38
|
|
|
9
39
|
- **One stylesheet, one script, no dependencies.** `dist/moey.css` (cascade layers: tokens, reboot, layout, content, forms, components, helpers, utilities) and `dist/moey.js`, plus minified copies. Inter and JetBrains Mono are bundled and self-hosted.
|
|
10
40
|
- **Mobile first.** Every page works down to 280px wide with no sideways scrolling; menus and dialogs become bottom sheets on phones and sit on the on-screen keyboard; fields never zoom the page.
|
|
11
|
-
- **Colors and themes.** 14 named colors × 12 shades, six strengths per component, painted areas (`theme-<color>-<strength>`), light and dark mode, and a brand switch (`data-mo-brand`)
|
|
41
|
+
- **Colors and themes.** 14 named colors × 12 shades, six strengths per component, painted areas (`theme-<color>-<strength>`), light and dark mode, and a brand switch (`data-mo-brand`), black "tuxedo" by default. Contrast checked to WCAG AA in both modes.
|
|
12
42
|
- **Layout.** Containers, a 12-column grid, CSS grid with `grid-cols-*` and `grid-min-*`, masonry, an app shell and sidebar, container queries, right-to-left.
|
|
13
43
|
- **Forms.** Fields, Moey dropdowns for every select, checkboxes, switches (also with a word inside), range, color picker, input groups, floating labels, chips, combobox, datepicker, time picker, OTP, password strength, validation, and rich text with the Mob editor.
|
|
14
44
|
- **Components.** Accordion, alert, avatar, badge, bottom sheet, breadcrumb, button, card, carousel, dialog, drawer, list group, menu, nav, navbar, tab bar, pagination, popover, progress, scrollspy, spinner, tabs, toasts, tooltip and more.
|
|
15
45
|
- **Work-app extras.** Data tables you edit in place (virtual scrolling, expandable, tree and grouped rows), charts, Kanban, split view, calendar, chat (with files, pictures and voice notes), keyboard shortcuts, tours, command palette, notification center, swipe actions, pull to refresh, sortable lists, filter & sort, infinite scroll, lightbox, audio and video player, click-to-load embeds.
|
|
16
|
-
- **Utilities.** Display, flex, grid, spacing (the number × 4px), sizing, text, colors, backgrounds, borders, effects, position, overflow, aspect ratio, interactions
|
|
46
|
+
- **Utilities.** Display, flex, grid, spacing (the number × 4px), sizing, text, colors, backgrounds, borders, effects, position, overflow, aspect ratio, interactions. Phone first, with responsive prefixes.
|
|
17
47
|
- **Accessible by default.** Keyboard support, focus rings, screen-reader roles and announcements, reduced motion.
|
|
18
48
|
- **Smaller builds.** `node build.mjs --without=… --breakpoints=… --out=…`.
|
|
19
49
|
- **For AI assistants.** `dist/ai-rules.md`, and `docs/llms.txt` / `docs/llms-full.txt`.
|
package/README.md
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
<img src="https://cdn.jsdelivr.net/npm/moey-ui@0.
|
|
1
|
+
<img src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/brand/moey-icon.svg" width="64" height="64" alt="Moey logo">
|
|
2
2
|
|
|
3
3
|
# Moey
|
|
4
4
|
|
|
5
5
|
A clean, mobile-first front-end framework for admin dashboards, productivity apps and websites — plain HTML, one stylesheet and one script. No dependencies, no build step.
|
|
6
6
|
|
|
7
|
+
**Docs, live examples and the changelog: [moey.dev](https://moey.dev)**
|
|
8
|
+
|
|
7
9
|
Moey takes the best ideas from the popular frameworks (Tailwind, Bulma, Bootstrap, shadcn, DaisyUI, Tamagui and others) and puts them into one consistent, carefully tested toolkit: cascade layers, OKLCH colors, light and dark mode, right-to-left, and a variable icon font.
|
|
8
10
|
|
|
9
11
|
## Why Moey
|
|
@@ -22,14 +24,14 @@ Moey takes the best ideas from the popular frameworks (Tailwind, Bulma, Bootstra
|
|
|
22
24
|
From a CDN (nothing to download):
|
|
23
25
|
|
|
24
26
|
```html
|
|
25
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.
|
|
27
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.css">
|
|
26
28
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/moey-icons@1.0.0/dist/moey-icons.min.css">
|
|
27
|
-
<script src="https://cdn.jsdelivr.net/npm/moey-ui@0.
|
|
29
|
+
<script src="https://cdn.jsdelivr.net/npm/moey-ui@0.3.0/dist/moey.min.js" defer></script>
|
|
28
30
|
```
|
|
29
31
|
|
|
30
32
|
Or from npm — `npm i moey-ui moey-icons` — and link the same files from `node_modules/moey-ui/dist/` (or copy `dist/` into your site). Keep `dist/fonts/` next to the stylesheet: Inter and JetBrains Mono are self-hosted (no Google Fonts, no outside requests), and browsers only download the language subsets a page uses.
|
|
31
33
|
|
|
32
|
-
Moey Icons are a separate package (`moey-icons`, [icons.
|
|
34
|
+
Moey Icons are a separate package (`moey-icons`, [icons.moey.dev](https://icons.moey.dev)); Moey works with any icon set, but its docs and examples use them.
|
|
33
35
|
|
|
34
36
|
## What's inside
|
|
35
37
|
|
package/dist/ai-rules.md
CHANGED
|
@@ -51,7 +51,7 @@ Moey is a mobile-first CSS + JS framework: one stylesheet (`moey.css`), one scri
|
|
|
51
51
|
|
|
52
52
|
## Helpers
|
|
53
53
|
|
|
54
|
-
`stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
|
|
54
|
+
`stack` (column, gap 16px) · `hstack` (row, centered, gap 12px) · `cluster` (wrapping row) · `spacer` (pushes the rest away) · `stretched-link` (whole card clickable) · `hover-lift` · `frosted` (frosted glass on a bar: tab bar, app header, sticky form buttons; bars are only slightly see-through by default, `--mo-glass`) · `focus-ring` · `icon-link icon-link-hover` · `sticky-top fixed-bottom` · `rtl-flip` (mirror an arrow icon in RTL)
|
|
55
55
|
|
|
56
56
|
## Layout
|
|
57
57
|
|
|
@@ -120,7 +120,7 @@ Stat tile: `<div class="card"><div class="card-body stat"><span class="stat-labe
|
|
|
120
120
|
```
|
|
121
121
|
Form layouts: `form-stack` · `form-inline` · `form-section` (+`form-section-header`, `form-section-body`) · `form-actions`. `<form data-moey-dirty>` tracks unsaved changes.
|
|
122
122
|
|
|
123
|
-
**Dialog / sheet / drawer** (native `<dialog>`; on phones a dialog becomes a bottom sheet)
|
|
123
|
+
**Dialog / sheet / drawer** (native `<dialog>`; on phones a dialog becomes a bottom sheet: `.dialog-center` keeps it centered, `.dialog-fullscreen-phone` covers the screen instead; page-wide colors: `--mo-dialog-bg` / `--mo-dialog-fg` on `:root`)
|
|
124
124
|
```html
|
|
125
125
|
<button class="btn" data-moey-open="#invite">Invite</button>
|
|
126
126
|
<dialog class="dialog" id="invite" aria-labelledby="invite-title">
|
|
@@ -194,15 +194,15 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
|
|
|
194
194
|
|
|
195
195
|
**Data table, more**: `data-moey-virtual` / `virtual: true` for thousands of rows; `detail: (row) => html` or `<template data-moey-detail>` for expandable rows; `children: [...]` or `<tr data-parent="id">` for tree rows; `groupBy: 'status'` / `data-moey-group-by` with `sum: true` / `data-moey-sum` for grouped rows. Never put a table inside a table cell.
|
|
196
196
|
|
|
197
|
-
**
|
|
197
|
+
**Griddy** (items of different heights packed into columns): `<div class="griddy grid-cols-2 md:grid-cols-4 gap-3" data-moey-griddy>…items…</div>` (images need width/height); `span-2` wide items, `.griddy-dense` fills holes, `.griddy-glide` makes items glide when the layout changes, add `data-moey-sortable` to rearrange. `data-moey-enter="pop|rise|drop|fade|zoom|slide|flip|blur|none"` (any list or grid) animates items added later, `data-moey-enter-first` the first page too, `Moey.enter(list)` replays. `.gallery-tile` + `.gallery-caption` for picture tiles. (Old names `.masonry` / `data-moey-masonry` still work; use griddy.)
|
|
198
198
|
|
|
199
199
|
**Filter & sort**: buttons in `<div data-moey-filters="#items">` with `data-moey-filter="tag"` (`"*"` = all) and `data-moey-sort-by="date"` (+ `data-moey-sort-dir="desc"`); items carry `data-tags="a b"` and `data-date`…; `data-moey-filter-search="#items"`, `data-moey-filter-count="#items"`, a `.filter-empty` inside.
|
|
200
200
|
|
|
201
201
|
**Infinite scroll**: `data-moey-infinite` on the list; `moey:load` → append items inside `e.detail.waitUntil(promise)`, call `e.detail.done()` on the last page. A "Load more" button takes over after 3 loads.
|
|
202
202
|
|
|
203
|
-
**Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3),
|
|
203
|
+
**Lightbox**: `data-moey-lightbox` on a gallery: `<a href="big.jpg" data-caption="…"><img src="small.jpg" alt="…"></a>` — also video (.mp4), audio (.mp3), a video site's embed address with `data-type="embed"`, `data-type="iframe"` pages/PDFs, `href="#template-id"` HTML. Parts: `data-moey-lightbox-thumbs="auto|always|never"`, `-counter`, `-caption`, `-zoom`, `-loop`, `-download`, `-share`, `-fullscreen`, `-slideshow="4000"` ("false" turns off). `data-moey-lightbox="name"` groups links across the page. `Moey.lightbox.open([...], options)`.
|
|
204
204
|
|
|
205
|
-
**Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="
|
|
205
|
+
**Audio & video**: `<div class="player" data-moey-player><video src="…" poster="…"></video></div>` (or `<audio>`, with `.player-head` > `.player-cover` + `.player-title`); `data-moey-controls="speed volume captions pip fullscreen"` or `"none"`. A file that can't play shows a message + Try again by itself (`data-moey-error-text`, event `moey:player-error`). Embeds that load on click: `<a class="embed" href="the video page" data-src="the site's embed address" data-moey-embed><img src="cover.jpg" alt=""><span class="embed-play"></span><span class="embed-title">…</span></a>` (`data-src` is loaded exactly as given; `.embed-9x16` for vertical clips). Never paste a raw video-site iframe into a page.
|
|
206
206
|
|
|
207
207
|
**Marquee** (logos, testimonials, tickers): `<div class="marquee" data-moey-marquee aria-label="…"><ul class="marquee-group"><li>…</li></ul></div>` — `data-moey-speed`, `.marquee-reverse`, `.marquee-vertical` (with a height). It pauses on hover/focus and has a pause button; don't remove it without another way to stop it.
|
|
208
208
|
|
|
@@ -229,7 +229,7 @@ On phones (below 1024px, or 768px with `navbar-expand-md`; `navbar-expand` never
|
|
|
229
229
|
|
|
230
230
|
## JavaScript API (only when needed)
|
|
231
231
|
|
|
232
|
-
`Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.
|
|
232
|
+
`Moey.toast()` · `Moey.confirm() / alert() / prompt()` · `Moey.open(el) / close(el)` · `Moey.tab()` · `Moey.tags()` · `Moey.chips()` · `Moey.toggle()` · `Moey.datatable()` · `Moey.select()` · `Moey.datepicker()` · `Moey.combobox()` · `Moey.palette()` · `Moey.notify()` · `Moey.clean(form)` · `Moey.chart()` · `Moey.kanban()` · `Moey.split()` · `Moey.calendar()` · `Moey.swipe()` · `Moey.refresh()` · `Moey.sortable()` · `Moey.timepicker()` · `Moey.chat()` · `Moey.shortcuts` · `Moey.tour()` · `Moey.marquee()` · `Moey.griddy()` · `Moey.enter()` · `Moey.filter()` · `Moey.infinite()` · `Moey.lightbox` · `Moey.player()`. Events are `moey:*` (e.g. `moey:select`, `moey:change`, `moey:open`, `moey:close`).
|
|
233
233
|
|
|
234
234
|
## Common mistakes to avoid
|
|
235
235
|
|