diff --git a/CHANGELOG.md b/CHANGELOG.md index f347ba1a..3845fd7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,8 @@ - [breaking] Rebuild Assembly's CSS pipeline on [UnoCSS](https://unocss.dev/). Class names and `buildUserAssets` stay compatible; the generated stylesheet's formatting, comments, and source maps may differ. Node.js 24+ is required. - [add] Export `presetAssembly()` for on-demand UnoCSS builds that keep Assembly class names. Pass `{ safelist: true }` only when you want the full prebuilt utility set. - [add] `examples/jit` — a sample app that generates only the utilities used in its markup (no reset or component preflight). +- [style change] Toggle groups are restyled as segmented controls. `toggle` is now 24px tall. +- [add] `toggle--l` (36px). - [internal] Assembly utilities are UnoCSS rules in `src/preset/`. Reset and component CSS live in `src/preset/base.css`. The package build is `src/build-*.js`. The documentation site is VitePress under `docs/`. ## 1.16.0 diff --git a/docs/.vitepress/theme/catalog/Toggles.vue b/docs/.vitepress/theme/catalog/Toggles.vue index 61ad2038..451656da 100644 --- a/docs/.vitepress/theme/catalog/Toggles.vue +++ b/docs/.vitepress/theme/catalog/Toggles.vue @@ -9,19 +9,18 @@ const colors = [null].concat(formColors.filter(color => !isLight(color))); const lightenColors = formColors.filter(isLight); const animals = ['cow', 'horse', 'pig']; -function toggleClass(color, activeColor) { +function toggleClass(color, activeColor, size) { return [ 'toggle', color ? `toggle--${color}` : '', - activeColor ? `toggle--active-${activeColor}` : '' + activeColor ? `toggle--active-${activeColor}` : '', + size ? `toggle--${size}` : '' ] .filter(Boolean) .join(' '); } -function groupClass(small) { - return small ? 'mb12 mr12 toggle-group toggle-group--s txt-s' : 'mb12 mr12 toggle-group'; -} +const groupClass = 'mb12 mr12 toggle-group'; function groupName(prefix, color, extra) { return `${prefix}-${color || 'default'}-${extra || 'on'}`; @@ -41,7 +40,7 @@ function groupName(prefix, color, extra) {