Skip to content

Releases: kungal/kun-ui

v2.13.0

Choose a tag to compare

Minor Changes

  • 6eadb74: feat(vue): KunPopover gains a fullWidth prop

    The trigger was wrapped in two hardcoded inline-block divs, so a consumer could
    never make the anchor span its container — external classes only reached the outer
    wrapper, not the inner triggerRef. <KunPopover full-width> now switches both
    wrappers to block w-full, so a full-width trigger (e.g. a fullWidth KunButton
    or a split button) fills the width. Default false (inline, content-width) —
    unchanged.

Patch Changes

  • @kungal/ui-core@2.13.0

v2.12.2

Choose a tag to compare

Patch Changes

  • 7a99394: fix(vue): KunDropdown / KunContextMenu item labels align left, not center

    Menu items are native <button>s, which default to text-align: center; the
    flex-1 label span inherited that, so short labels sat centered. Both item rows
    now carry text-left so the label starts at the left edge (icon → label), the
    expected menu-item layout.

    • @kungal/ui-core@2.12.2

v2.12.1

Choose a tag to compare

Patch Changes

  • f5c867b: fix(vue): KunMessage no longer jumps wider for a frame when dismissed

    The leaving toast went position: absolute; width: 100%, but the % resolved
    against the outer fixed container's padding box — 2rem wider than the in-flow
    content width — so the toast visibly widened and spilled out the right edge for a
    frame before fading. The TransitionGroup wrapper is now the containing block
    (position: relative), so width: 100% matches the in-flow width exactly.

  • f5c867b: fix(vue): KunMessage toasts use semantic-colored border + count badge

    Each toast's outline is now its own semantic colour (ring-{color}/50) instead of
    a uniform neutral grey ring, and the de-dup count badge uses a matching
    bg-{color}/10 tint instead of the neutral bg-black/10. Each type now reads as
    one cohesive coloured surface in both light and dark.

    • @kungal/ui-core@2.12.1

v2.12.0

Choose a tag to compare

Minor Changes

  • 08e2226: feat(vue): KunAutocomplete & KunSelect support custom option rendering via #option

    Both components are now generic over the option shape, so you can pass options
    with extra fields (avatar, description, …) and read them — typed — in a new
    #option scoped slot: <template #option="{ option, index, active, selected }">.
    Render a leading image, two-line text, badges, anything. Without the slot the
    plain label renders exactly as before (fully backward-compatible). Select keeps
    its check indicator outside the slot, and the option row now groups rich content
    at the left with the indicator at the right.

Patch Changes

  • @kungal/ui-core@2.12.0

v2.11.0

Choose a tag to compare

Minor Changes

  • 0215eec: feat(vue): KunAutocomplete gains loading + debounce for async data sources

    :loading shows a spinner in the dropdown (reusing KunLoading) instead of
    noResultText while a remote @search request is in flight — drive it from your
    fetch (true on request start, false when the options land). :debounce (ms)
    delays the @search emit so you fetch once the user pauses, not per keystroke
    (the input text still updates instantly). The two mesh: while the debounce is
    armed the spinner already shows, so the gap before the request never flashes
    "no matches" — it's continuous from keystroke to results. :loadingText sets the
    spinner caption (default '加载中…'). Fully backward-compatible: debounce defaults
    to 0 (emit every keystroke, unchanged).

Patch Changes

  • 0215eec: fix(vue): KunAutocomplete no longer reopens the panel after picking an option

    Clicking an option blurred the input, and the post-select refocus then
    re-triggered the @focus-to-open — so the panel visibly closed and sprang back
    open. Options now @mousedown.prevent (keeping focus on the field, so no
    reopen), and the input opens on @click too so clicking the already-focused
    field can still reopen the list. Keyboard selection was unaffected either way.

    • @kungal/ui-core@2.11.0

v2.9.1

Choose a tag to compare

Patch Changes

  • f4f84d3: fix(vue): KunReaction honors active skin in action mode (menu-button reactions)

    The filled/coloured skin now follows the active model in BOTH modes, not just
    toggle mode. This lets an action-mode (toggle="false") reaction be a
    controlled "menu button": wrap it as a KunPopover trigger, bind :model-value
    to your own state, and the click opens the picker instead of self-toggling while
    the skin still reflects your state. This is what a 收藏 button needs when it sits
    next to a 点赞 reaction — both stay peer pills (identical skin), but 收藏's click
    opens a 收藏夹 picker and its filled state = "in ≥1 list" (Bilibili / YouTube
    pattern), no split button. Fully backward-compatible: existing action-mode
    buttons (share / more …) pass no active, so they stay neutral exactly as before.

    • @kungal/ui-core@2.9.1

v2.9.0

Choose a tag to compare

Minor Changes

  • 1e253ef: feat(vue): add KunButtonGroup (segmented actions + split buttons)

    KunButtonGroup joins a row/column of KunButtons into one attached unit —
    collapsing the touching inner corners and overlapping the 1px borders into a
    single seam. It is the building block for a GitHub-style split button: a
    primary KunButton next to a chevron KunButton that triggers a KunPopover
    holding a rich menu (e.g. a KunCheckBoxGroup of lists + a "create list"
    footer). The seam CSS reaches a button nested inside a KunPopover trigger
    wrapper, and — because the popover panel teleports to <body> — never touches
    the menu's own buttons. Supports orientation="horizontal" | "vertical".

Patch Changes

  • @kungal/ui-core@2.9.0

v2.8.3

Choose a tag to compare

Patch Changes

  • 4ec9965: fix(vue): KunModal panel is opaque by default (drop the hardcoded 85% alpha)

    The modal panel hardcoded bg-content1/85, forcing an 85%-opaque (see-through)
    surface that ignored --kun-surface-opacity and stacked on top of it — so on a
    site that already lowered that token (a background-image page) the panel went
    even more translucent than every other surface. It now uses plain bg-content1
    like Card / Drawer / Dropdown / Tooltip / Select, so it is fully opaque by
    default and follows --kun-surface-opacity (set it < 1 with --kun-backdrop-filter
    to opt every surface into frosted glass at once). The backdrop scrim is unchanged.

    • @kungal/ui-core@2.8.3

v2.10.0

Choose a tag to compare

Minor Changes

  • a7d8e8d: feat(vue): KunTabPanel gains a loading state (dim + inert + aria-busy)

    <KunTabPanel :loading> marks a panel busy while async / lazy data resolves. It
    dims the panel to 0.5 opacity, makes it inert (no pointer or keyboard
    interaction) and sets aria-busy for screen readers. The dim uses a delayed
    fade (transition: opacity 0.2s 0.2s linear — the React useDeferredValue
    trick): a load that resolves quickly clears loading before the dim ever paints,
    so fast tab switches never flicker; only a genuinely slow load visibly dims. It
    snaps back to full opacity the instant content is ready, and honours
    prefers-reduced-motion.

    This is the stale-while-revalidate mechanism only — it dims content that is
    already there. For a true first load (nothing to dim), render a skeleton (e.g.
    KunSkeleton) in the slot and leave loading off, so the skeleton shows at full
    opacity; flip loading on only when revalidating existing content. See the new
    "懒加载 / 加载中" docs example.

Patch Changes

  • @kungal/ui-core@2.10.0

v2.8.2

Choose a tag to compare

Patch Changes

  • 1e31d5c: fix(vue): KunTab active-tab text color now tracks the sliding indicator

    The per-tab text color transitioned over Tailwind's default 150ms while the
    sliding indicator slid over 250ms (--kun-dur-base), so the newly-active tab's
    text reached its final color ~100ms before the pill arrived under it. With
    solid/pills that meant the text went white over the still-uncovered light
    background and read as "invisible until the animation finished". The tab text
    transition is now pinned to the indicator's duration and easing
    (duration-kun-base ease-kun-standard), so color and position land in lockstep.

    • @kungal/ui-core@2.8.2