Commit 7c9f669
fix: various visual component fixes + floating-ui/colorpicker positioning (#1255)
* fix: mt-action-menu z-index order
* fix: mt-banner adjust close icon and typo spacing
* fix: adjust gap of checkbox and switch, plus added gap to mt-base-field label
* fix: adjust checkbox component icon, spacing and default line-height and font-size for mt-base-field labels
* fix: select field icons, spacing, active state etc.
* fix: select and button changes
* fix: keep mt-colorpicker popover absolutely positioned
The floating-ui root carries both .mt-floating-ui (position: relative) and
.mt-colorpicker__colorpicker-position (position: absolute). Both are plain,
equal-specificity class selectors in unscoped stylesheets, so the winner
depended on bundle source order — intermittently letting .mt-floating-ui win
and dropping the closed popover back into document flow.
Qualify the rule with the .mt-colorpicker ancestor so it deterministically
wins, mirroring the existing --compact rule. Removes the need for a :deep
override in consuming code.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: pin mt-floating-ui content position to the computed strategy
The teleported .mt-floating-ui__content is positioned by writing the
floating-ui coordinates inline, but `position` was left to CSS. Consumer
classes passed on <mt-floating-ui class="..."> are copied onto this element,
so a class carrying `position: absolute` (e.g. mt-colorpicker's positioning
class) flipped the fixed-strategy coordinates into document space — the
popover then rendered in a seemingly random spot and drifted away on scroll.
Write `position: strategy` inline alongside top/left so it always matches the
coordinate space floating-ui computed for. Inline style wins over any copied
class, immunizing every consumer against this class of misposition.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: add changeset for visual component fixes
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* chore: remove commented-out CSS in mt-label and mt-select-selection-list
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* fix: update icon references after mt-checkbox icon rename
The checkbox check/partial icons changed from regular-checkmark-xxs /
regular-minus-xxs to solid-checkmark-xs / solid-minus-xs. Update the
references that still pointed at the old names:
- mt-popover-item spec assertions (was failing in CI)
- mt-checkbox interactive story assertion
- mt-segmented-control checkmark sizing selector (was silently no longer
matching)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
* update snapshots
* fix: redesign number field stepper and align radio group spacing
- mt-number-field: the increment/decrement controls become a bordered
box (1px border, --border-radius-xs) split 50/50 by a 1px separator,
icons centered, 32px wide, height matched to the field in every size
- mt-unit-field: inherits the stepper box from the number field, drops
the doubled gap toward the unit select trigger, and hides the stepper
via a container query below 240px
- mt-radio-group-item: indicator-to-label gap 4px -> 8px, matching the
earlier checkbox and switch spacing adjustment
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* update snapshots
* fix: correct field visual regressions from spacing and icon changes
- mt-checkbox: restore centered box alignment by default; gate the
first-line offset (margin-top) behind the new consistentLabelLineHeight
future flag and a has-label check, so label-less checkboxes (data
tables, custom layouts) are no longer pushed down
- mt-checkbox: bordered variant gets min-height like the switch instead
of relying on vertical padding, fixing its height
- mt-base-field: label line-height stays the legacy 16px by default; the
token line-height (--font-line-height-xs) is opt-in via
consistentLabelLineHeight so existing label baselines are preserved
- mt-segmented-control: checkbox keeps no first-line offset (the action
centers its content itself)
- mt-modal: center the close button icon (a bare button does not, so the
inline-block icon sat low on the baseline)
- mt-number-field: add a disabled state for the stepper box; hide the
stepper via a container query when the field is too narrow (e.g. the
number fields inside a range slider), moved off mt-unit-field so it
applies to plain number fields and sliders too
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* update snapshots
* chore: drop the code comments added with the field fixes
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* Adjusted icon sizes in input components
* update snapshots
* Adjusted icon sizes in input components
* test: drop full-page screenshot assertion from nuxt-app smoke test
Keeps the functional smoke checks; whole-page pixel regression is
redundant with the component library's own visual snapshots and broke
on every component restyle.
* update snapshots
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 9eb0c3d commit 7c9f669
223 files changed
Lines changed: 231 additions & 147 deletions
File tree
- .changeset
- examples/nuxt-app/tests
- smoke.spec.ts-snapshots
- packages/component-library
- __snapshots__
- src
- components
- _internal
- mt-base-field
- mt-select-base
- _internal
- mt-banner
- mt-button
- mt-checkbox
- mt-colorpicker
- mt-datepicker
- mt-floating-ui
- mt-modal
- mt-number-field
- mt-password-field
- mt-popover-item
- mt-radio-group
- mt-search
- mt-segmented-control
- mt-select
- mt-switch
- mt-unit-field
- composables
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
31 | | - | |
32 | 30 | | |
Binary file not shown.
Binary file not shown.
0 commit comments