diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml new file mode 100644 index 0000000..49105ec --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -0,0 +1,29 @@ +name: Bug report +description: A component looks or behaves wrong. +labels: ["bug"] +body: + - type: input + id: component + attributes: + label: Component + description: The component's slug, such as tooltip or otp-input. + validations: + required: true + - type: textarea + id: what + attributes: + label: What happened + description: What you expected, what you saw instead, and the steps to get there. + validations: + required: true + - type: input + id: environment + attributes: + label: Browser and device + description: Such as Safari 18 on iPhone, or Chrome 130 on Windows. + - type: textarea + id: repro + attributes: + label: Reproduction + description: A link to a sandbox or a minimal code snippet, if you have one. + render: tsx diff --git a/.github/ISSUE_TEMPLATE/component_request.yml b/.github/ISSUE_TEMPLATE/component_request.yml new file mode 100644 index 0000000..44ccae9 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/component_request.yml @@ -0,0 +1,23 @@ +name: Component request +description: Suggest a new component or a feature for an existing one. +labels: ["enhancement"] +body: + - type: input + id: component + attributes: + label: Component + description: An existing slug to extend, or a name for a new one. + validations: + required: true + - type: textarea + id: use + attributes: + label: What it is for + description: Where you would use it and what it should do. + validations: + required: true + - type: textarea + id: reference + attributes: + label: References + description: Links, screenshots, or recordings of something similar. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..597aadd --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## What changed + + + +## Why + + + +## Screenshots or recording + + + +## Checklist + +- [ ] Branch is named `feat/…`, `fix/…`, `docs/…`, or `chore/…` and rebased on `main` +- [ ] Pull request title is a conventional commit, such as `fix: tooltip position on scroll` +- [ ] Added a line under `## [Unreleased]` in `CHANGELOG.md` (mark **Breaking** if existing copies break) +- [ ] `bun run check` and `bun run test` pass +- [ ] Reduced motion, keyboard, and 44px tap targets checked +- [ ] For a new component, registry entry and dates added in `lib/registry.ts` and `lib/component-dates.ts` diff --git a/.gitignore b/.gitignore index 7ce3f9d..bf9f265 100644 --- a/.gitignore +++ b/.gitignore @@ -44,3 +44,8 @@ next-env.d.ts # editor / local agent config .claude/ .env + +# Generated uploads for 21st.dev (scripts/build-21st.ts). +/21st-export +/app/blocks-preview +/.21st-render diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..0edf209 --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,108 @@ +# Changelog + +All notable changes to easeUI are listed here. The format follows +[Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions follow +[Semantic Versioning](https://semver.org/spec/v2.0.0.html). + +Components ship as copy-paste source through the `@easeui` shadcn registry, so a +change to a component's props or behavior is called out under its name. Breaking +changes to a component's API are marked **Breaking**. + +## [Unreleased] + +### Added + +- `CHANGELOG.md`, branch and release rules in `CONTRIBUTING.md`, a pull request template, and issue templates for bugs and component requests. +- 21st.dev export scripts. `scripts/build-21st.ts` turns seven picks (Rating, Tag Input, Morphing Search, Hold to Confirm, Expandable Tabs, Stepper, Number Ticker) into self-contained files with the motion tokens inlined and colors mapped to the stock shadcn theme. +- `scripts/build-21st-blocks.ts` bundles six blocks (Agent Run, Onboarding Flow, Revenue Dashboard, Account Settings, Sign In With Code, Mobile App Shell) into single files, inlining every free component each one uses. + +### Changed + +- Stepper: every step now takes an equal share of the row, the last one included, so labels stay centered under their circles. + +## [0.1.0] - 2026-10-02 + +The first public release: 53 components across two categories, a docs site, a +shadcn registry, a hosted MCP server, and an agent skill. + +### Added + +#### Components + +- **Button** with four variants, a quick press, hairline rings, and a 44px tap area at every size. Icons animate on hover. +- **Tabs** in pill, segment, and underline styles with a sliding indicator. +- **Select** whose menu scales out of the trigger and opens upward when there is no room below. +- **Tooltip** with keyboard shortcuts (Command on Mac, Ctrl elsewhere) and an instant crossfade along a toolbar via `TooltipGroup`. +- **Theme Toggle** that reveals the new theme as a growing circle, from the screen center or the button. +- **Range Slider** on a native range input, with a filled track and tick dots. +- **Hold to Confirm** for destructive actions. Fills while held and drains back on early release. +- **Switch** in two sizes. Inside a label, the whole row is the tap target. +- **Copy Button** that swaps its icon for a check, with or without a label. +- **Toast** with reading-time durations, pause on hover or a background tab, a stack that spreads on hover, and swipe to dismiss. +- **Gradient Text** with a drifting rainbow that pauses off screen. +- **Modal** on the native dialog element, with focus kept inside. +- **Skeleton** with one shimmer shared across the page, wrapping real content to take its shape. +- **Accordion** that grows to natural height with no measuring, with arrow key navigation. +- **Checkbox** on a real checkbox input with a check that pops in. +- **Drawer**, a bottom sheet on the native dialog element. Drag or flick to dismiss. +- **Input** with a focus ring that grows from a hairline, and a destructive ring for `aria-invalid`. +- **Textarea** that grows with its content up to a scrollable cap. +- **Badge** in five colors with a crossfade between variants. +- **Progress** that fills with scale, plus an indeterminate state. +- **Card** with header, title, description, content, and footer parts. +- **Avatar** in three sizes with a status dot, image fade-in, initials fallback, and an `AvatarGroup` that fans out on hover. +- **Alert** with a colored accent stripe and neutral body text. +- **Dropdown Menu** that flips upward when needed and supports a destructive item. +- **Command Palette**, a command-K overlay with filtering, groups, and arrow key navigation. +- **Number Ticker** that rolls each changed digit like an odometer. +- **OTP Input** with paste and SMS autofill, a shake for a wrong code, and an `onVerify` mode that runs the check-and-color cycle itself. +- **File Upload**, a dropzone with a native picker, size limits, and an animated file list. +- **Popover** anchored to a trigger, opening on click and flipping when needed. +- **Table** with sortable headers, resizable columns, selected rows, and a loading cell. +- **Selection Actions**, a floating bulk action bar that appears once a selection exists. +- **Insight Card**, a stat tile with an optional trend pill. +- **Diff View** that renders a precomputed line diff. +- **Text Animation** with scramble, reveal, and shimmer variants. +- **Pull to Refresh** that tracks the finger, then resists past the trigger distance. +- **Notification Stack** that fans from a peeking deck into a list on hover or focus. +- **Expandable Tabs**, icon tabs where the selected one expands to show its label. +- **Morphing Search**, a search button that morphs into a text field. +- **Dynamic Island**, a pill that morphs between a compact line and named views. +- **Rating** with hover preview, a fill wave, and native radios for arrow keys. +- **Stepper** with a line that fills as you advance and clickable finished steps. +- **Tag Input** where Enter or a comma adds a tag, Backspace marks then removes, and duplicates shake. + +#### Agents components + +- **Message Bubble** with tones, alignment, and a tail that pops in. +- **Agent Loading States** with `ShimmerText`, `AgentProgress`, and `ReasoningPhases`. +- **Pixel Loader**, a 3x3 twinkling grid with a shimmering label and an elapsed timer. +- **Todo List**, a collapsible task plan with morphing status marks. +- **Streaming Text** that fades in new text without replaying what is shown. +- **Streaming Response** with copy, replay, share, feedback, and follow-up prompts. +- **Prompt Input**, a growing composer whose send button crossfades into stop. +- **Code Block** with a copy button and light syntax coloring, no highlighter dependency. +- **Tool Approval**, a card whose Approve and Deny collapse into a status pill. +- **Flowchart**, draggable steps on a dotted canvas with live connectors and an if/else editor. +- **Tool Chip**, a pill naming a tool with a status mark that crossfades in place. + +#### Site and tooling + +- Docs site with a components sidebar, previews, and an API table per component. +- shadcn registry at `/r`, installable as `@easeui/`, with direct-URL fallback. +- Hosted MCP server at `/api/mcp`, an agent skill in `skills/easeui`, and an agent guide. +- `@shadcn/lint` through oxlint, a registry check, and accessibility tests in CI. +- Links to easeUI Pro and Studio from the free site. + +### Fixed + +- Layout shift when a modal or drawer opens. +- Progress bar now has a defined track and a value label. +- Avatar fallback contrast and the mobile nav close label. +- Hairline rings on bare `bg-muted` fills for light mode contrast. +- OTP success check now morphs in place instead of popping in beside it. +- Pull to Refresh and Dynamic Island previews no longer restyle through `className`. +- The sidebar stays mounted across navigation. + +[Unreleased]: https://github.com/rjcuff/easeui/compare/v0.1.0...HEAD +[0.1.0]: https://github.com/rjcuff/easeui/releases/tag/v0.1.0 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 13b00e9..bea479b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,12 +50,46 @@ Site copy, descriptions, and hints should read plainly. - No "Label: text" phrasing in sentences. - Avoid marketing words like seamless, effortless, or elevate. +## Branches + +`main` is always releasable and only changes through pull requests. Work happens on a +short-lived branch cut from the latest `main`, one branch per change, deleted once it merges. + +Name the branch after the change and the component it touches: + +| Change | Branch | +| --- | --- | +| New component | `feat/`, such as `feat/color-picker` | +| Improve a component | `feat/-`, such as `feat/avatar-sizes` | +| Bug fix | `fix/-`, such as `fix/tooltip-scroll-position` | +| Docs or site copy | `docs/` | +| Tooling, CI, deps | `chore/` | + +```bash +git switch main && git pull +git switch -c fix/stepper-equal-width +# work, commit +git push -u origin fix/stepper-equal-width +``` + +Rebase on `main` instead of merging it in, so the history stays a straight line: +`git fetch && git rebase origin/main`. + ## Commits and pull requests -- Use conventional commits, such as `feat: add switch component` or `fix: tooltip position on scroll`. -- Keep each pull request focused on one change. +- Use conventional commits, such as `feat: add switch component` or `fix: tooltip position on scroll`. Put the component in the subject so the history reads per component. +- Keep each pull request focused on one change, and one component where possible. +- Add a line under `## [Unreleased]` in `CHANGELOG.md`, in the Added, Changed, Fixed, or Removed group. Mark a change to a component's props or behavior that breaks existing copies with **Breaking**. - Include a short description and a screenshot or recording for visual changes. - Make sure `bun run check` and `bun run test` pass. +- Pull requests are squash merged, so the pull request title becomes the commit on `main`. Write it as a conventional commit. + +## Releases + +1. Move the `[Unreleased]` entries in `CHANGELOG.md` under a new version and date, and bump `version` in `package.json`. A new component or prop is a minor bump, a fix is a patch, and a **Breaking** entry is a major bump once past 1.0. +2. Commit as `chore: release vX.Y.Z` through a pull request. +3. Tag the merge commit and push the tag: `git tag -a vX.Y.Z -m "vX.Y.Z" && git push origin vX.Y.Z`. +4. Create a GitHub release from the tag with that version's changelog section as the notes. ## License diff --git a/components/motion/stepper.tsx b/components/motion/stepper.tsx index 4130670..58de1fb 100644 --- a/components/motion/stepper.tsx +++ b/components/motion/stepper.tsx @@ -32,7 +32,7 @@ export function Stepper({ steps, current, onStepClick, className }: StepperProps const Tag = clickable ? "button" : "div"; return ( -
  • +
  • {index < steps.length - 1 ? ( // The line to the next step. It sits behind the circles and fills from the left.