npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@flowercomputer/flowerparts

v0.6.4

Published

Flower Computer Company Svelte UI components.

Readme

Flowerparts

Svelte UI components for Flower Computer Company projects.

Install

npm install @flowercomputer/flowerparts

Import the package styles once near the root of your app:

import "@flowercomputer/flowerparts/styles.css";

Then import the components you need:

<script lang="ts">
    import { Button, Dialog, Sidebar, TextField } from "@flowercomputer/flowerparts";
</script>

Components

The package exports components, icons, helper functions, and public prop types from src/lib/index.ts.

Dialog

Dialog is a modal vessel for composing more atomic controls into a focused workflow. The component owns the native <dialog> lifecycle, overlay chrome, header, close behavior, and optional footer; callers own the form fields, grids, copy states, and submit behavior inside it.

<script lang="ts">
    import { Button, Dialog, TextField } from "@flowercomputer/flowerparts";

    let open = $state(false);
    let name = $state("");
</script>

<Button onclick={() => (open = true)}>New workspace</Button>

<Dialog bind:open title="New workspace">
    <TextField
        bind:value={name}
        autofocus
        fullWidth
        label="Tenant name"
        labelHidden
        placeholder="tenant name"
    />

    {#snippet footer({ close })}
        <Button
            variant="primary"
            disabled={!name.trim()}
            onclick={() => close()}
        >
            create
        </Button>
    {/snippet}
</Dialog>

Useful controls:

  • bind:open, onOpenChange, and onClose cover controlled and local modal state.
  • children, footer, headerLeft, and headerRight are snippets. The snippet props expose open, close, titleId, and contentId.
  • scrim="default" is the ordinary translucent modal scrim. scrim="warning" adds low-opacity diagonal pinstripes for destructive or high-attention flows.
  • closeOnScrim, closeOnEscape, closeLabel, and closeAriaLabel tune dismissal.
  • Styling is token-driven through custom properties such as --dialog-inline-size, --dialog-block-start, --dialog-content-padding, --dialog-footer-padding, --dialog-scrim-background, --dialog-warning-scrim-delay, --dialog-warning-scrim-duration, --dialog-warning-scrim-easing, --dialog-warning-scrim-stripe-color, and --dialog-warning-scrim-stripe-width.

Popover

Popover is an anchored rich panel primitive. It is intentionally not a menu: use ordinary links, buttons, form fields, or custom content inside it, but do not rely on ARIA menu semantics until there is menu-style keyboard behavior.

<script lang="ts">
    import { Popover } from "@flowercomputer/flowerparts";
</script>

{#snippet trigger(props)}
    <button
        id={props.id}
        aria-controls={props["aria-controls"]}
        aria-expanded={props["aria-expanded"]}
        aria-haspopup={props["aria-haspopup"]}
        onclick={props.onclick}
    >
        Support
    </button>
{/snippet}

{#snippet content(props)}
    <a href="/docs" onclick={props.close}>Documentation</a>
{/snippet}

<Popover
    aria-label="Support"
    side="top"
    align="end"
    matchTriggerWidth
    initialFocus="first-focusable"
    {trigger}
    children={content}
/>

Useful controls:

  • side, align, sideOffset, and collisionPadding position and clamp the fixed panel against the trigger.
  • matchTriggerWidth makes the content width track the trigger width without consumer CSS reach-through.
  • initialFocus="content" or "first-focusable" opts into focus movement when opened. By default, focus stays on the trigger.
  • restoreFocus, closeOnEscape, and closeOnOutsidePointerDown tune dismissal behavior.
  • aria-label, aria-labelledby, and aria-describedby label the dialog content.

SidebarItem can also describe a popover-triggering row, so footer and section item arrays stay the source of truth for row contents:

{#snippet supportPopover(props)}
    <a href="/help" onclick={props.close}>Help & Support</a>
{/snippet}

<Sidebar
    headerItems={[{ label: "Inbox", href: "/inbox" }]}
    footerItems={[
        { label: "Documentation", href: "/docs" },
        { label: "Support", popover: supportPopover },
    ]}
/>

Sidebar also exposes headerPopover and footer snippets for anchored custom content without replacing the core sidebar layout. headerPopover is pinned below the title button and receives open, close, and collapsed. Use headerHref when the header row should be a full-width navigation item instead of a popover trigger. Use headerItems for additional rows in the header area; they use the same SidebarItem shape and spacing as section and footer rows.

Development

npm install
npm run check

Public package code lives in src/lib. For visual iteration, consume the local package from an app repo and exercise components in product context.

Packaging

npm run package
npm run pack:dry-run

Publishing runs npm run check through prepublishOnly.

The package output is dist.