65 Commits

Author SHA1 Message Date
Ashley Hunter 1b743f8019 test: migrate from jest to vitest with browser testing for brain/helm
Replace Jest with Vitest across the workspace. The brain and helm Angular suites
now run in a real browser (Playwright/Chromium via Vitest browser mode) so they
exercise real layout, focus, pointer events and computed styles that jsdom could
not. The cli, tools, mcp, registry and cli-smoke suites run on Vitest's node
environment.

- Add per-project vite configs and switch test targets to @nx/vitest:test
- Convert jest APIs to vi.* and jest module mocks to vi.mock with importOriginal
- Replace jest-axe with a browser-native axe-core helper and toHaveNoViolations
- Regenerate snapshots in vitest format (content unchanged, format-only)
- Remove all jest packages, configs, the preset and the @nx/jest target default
- Install Playwright Chromium in the CI unit job for the browser suites

Also fixes a brain avatar test that asserted inside a fire-and-forget setTimeout,
which passed vacuously under jsdom and only surfaced once a real browser loaded
the image.
2026-06-13 15:16:45 +01:00
Ashley Hunter 334dd18ebe test(cli): add the cli-smoke setup-matrix harness
Scaffolds real nx (monorepo + standalone) and angular-cli workspaces from the
locally published CLI, runs the generators, runs healthcheck, consumes a
generated component, and builds - covering library/entrypoint x
buildable/non-buildable plus an all-components cell. Runs each cell on its own
runner via a dedicated workflow with a required result check, and stays cheap on
unrelated PRs via a git-diff gate and an in-runner affected check. Adds a
`pnpm smoke` convenience script.
2026-06-10 22:55:47 +01:00
Robin Goetz fc8c037add feat(mcp): release and version mcp server alongside cli and brain (#1448)
* feat(mcp): release and version mcp server alongside cli and brain

Wire the MCP server package into the release pipeline so it is published
and version-synced with the cli and brain packages. Add a
replace-mcp-version generator (invoked by auto-increment-version for
nightly and prepare-manual-release for manual), a release-mcp script,
and sync the package to the current alpha version.

Also drop the orphan scope:core tag from release-ui and list mcp in the
PR template's affected-packages section.

* refactor: document release schemas and harden version error handling

Fill in the empty titles and descriptions on the release generator and
executor schemas, and declare the newVersion option so the version
generators are self-documenting and CLI-invocable.

Make the version generators throw with actionable messages instead of
silently logging and returning, validate the brain version format in
auto-increment-version, and fix the misleading source-of-truth message
in replace-ui-version.

* fix: prevent shell injection in npm publish and correct version flag hints

Validate the TAG dist-tag and publish via execFileSync with an argument
array instead of interpolating it into a shell string, removing a
shell-injection vector in the npm-publish executor.

Correct the version generators' error messages to reference the actual
--newVersion / --new-version flag rather than the reserved --version.
2026-06-10 09:58:55 +02:00
goetzrobin 45b008db12 ci: automate updates to the 300 contributors
Add a scheduled workflow that runs the update-contributors generator daily and
commits newly detected contributors, mirroring the nightly release setup. Also
add the five contributors the generator surfaced that were missing from the
README and the home page list.
2026-06-04 14:02:59 +02:00
Marc Stammerjohann 8847b506b3 chore: update actions/cache and nrwl/nx-set-shas v4 to v5
* removes ci warning for "Node.js 20 actions are deprecated"
2026-06-03 16:18:52 +02:00
Ashley Hunter c920f4ed58 ci: cache Nx, run only affected, and parallelize to cut CI time (#1383)
* docs: add CLAUDE.md with repo conventions for agents

Documents the local CI checks to run before pushing, Conventional Commit
rules (including the commitlint scope enum), and populating the PR template.

* ci: cache Nx, run only affected, and parallelize to cut CI time

Without relying on Nx Cloud:
- shared composite setup action (pnpm + Node + install + Nx cache restore),
  removing the duplicated install boilerplate across jobs
- persist the Nx computation cache via actions/cache so unchanged projects are
  restored as cache hits instead of rebuilt/retested/relinted
- run nx affected (with nrwl/nx-set-shas) for lint/test/build/e2e instead of
  run-many --all, so PRs only touch the projects they change
- unit no longer needs the build job, so it runs in parallel instead of waiting
  ~13 min for the build
- cancel superseded runs on the same ref via concurrency
- blobless full-history clone on the light jobs (keeps affected working)

* ci: run e2e in parallel instead of gating it on the docs build

The e2e suite runs cypress against storybook (its devServerTarget is
ui-storybook:static-storybook), so it is independent of the docs-app build and
no longer needs to wait ~13 min for it.

* perf: trim the docs-app vite build config

- reportCompressedSize: false (skip per-chunk gzip sizing)
- gate rollup-plugin-visualizer behind ANALYZE (was every build)
- drop the deprecated splitVendorChunkPlugin
- make prerender concurrency configurable (default 1; parallel prerender was a
  net slowdown - the renders are CPU-bound single-thread SSR)

* ci: cache the cypress binary in the e2e job

* ci: exclude trpc-app-e2e from affected e2e (not a CI e2e suite)

* ci: restore cypress cache before install; harden prerender concurrency parse

* chore: drop prerender-concurrency experiment scaffolding and restore splitVendorChunkPlugin

Reverts two leftovers from the (rejected) parallel-prerender and Vite 8
experiments: prerender concurrency goes back to a hardcoded 1, and
splitVendorChunkPlugin is restored since it still works on Vite 6 and removing
it only changed chunking with no speed benefit.
2026-06-03 16:07:34 +02:00
Marc Stammerjohann 49d2d3ad70 chore: update pnpm action-setup for ci 2026-04-14 13:01:06 +02:00
Sammy Mohamed 3f743e19f7 feat: better form control integration (#1053)
* feat: better form control integration

- general a11y described by service
- hint and error stories
- datepicker value type
- mock resizeObserver causing select failure
- form desciption test failures

* feat: autocomplete and combobox

- re-implemented form integration based on latest implementation

* fix: error state

* fix: formatting

* chore: update snapshot

* fix: format

* fix: update snapshot

* fix: autocomplete stories

* fix: test

* fix: remove not needed effects

* fix: call onTouched when autocomplete focus out

* fix: evaluate only error state in field

* fix: fix slider classes and field integration

* fix: set correct error styles to input group

* feat: add native select field control support

* fix: implement field control

* fix: emit touched when blurred for combobox

* fix: add invalid support for combobox multiple

* fix: fix autcomplete search and input styles

* feat: improve control state data attributes and hlm-error

- render hlm-error if error presetn
- add touched, dirty and matches-spartan-invalid attributes

* feat: apply field control as host directive

* test: fix some control error stories WIP

* fix: lint issues w/ type imports and sort order

* chore: remove form-field package as it is replaced by field

* chore: update snapshot

* fix: fix autocomplete providers array and error story

* fix: fix select, field error and input group

* docs: fix reactive forms examples WIP

* feat: add healthcheck and migration for hlm-form-field to hlm-field

* fix: add value accessor to date-picker multi

* docs: update field for/id

* fix: fix checkbox and rename CVA providers

* fix: add and fix tests

* docs(field): update headings

* feat(autocomplete): add inputId

* feat(combobox): add input/button id

* chore: update snapshot

* docs(date-picker): use hlm field

* docs(field): add native-select example, simplify selectId

* docs: use hlm-field for date-picker blocks

* feat: update form field usage in autocomplete story

* fix(input): unit test and remove unused ngControl

* fix: comment out missing errorState in select

* feat: remove ng-* classes

* feat: remove unused code

* fix: comment out error in unit tests

* feat: set label for attribute automatically

* refactor: rename variable

* docs: add brain input and textarea docs

* fix: apply button styles in storybook

* fix: fix select test and add missing attributes

* feat: add attributes to switch

* fix: fix field e2e tests and lint errors

* chore: fix format

* fix: add optional chain

* feat(select): add controls and aria labels to brn-select-trigger

* fix: update default value for select demo

* docs(select): add form example

* chore: update snapshot

* fix(select): add optional chain for aria-invalid

* feat(select): update e2e test form attributes

* fix(input): form unit test

* fix(select): update unit test template, add HlmFieldControlDescribedBy to select trigger button

* fix(combobox): use new combobox template for unit test

* add hlmFieldControlDescribedBy to combobox trigger button

* chore: remove console log from unit test

* fix(checkbox): use buttonName instead of id

* fix: lint issue w/ import

* test: fix unit tests

* docs: add field date picker preview

* docs: fix blocks and reactive forms

* docs: improve control, field and forms docs

* feat: add provider for error matcher

* chore: rename var

* fix: replace aria-invalid in registry styles

* feat: move state to brn, add to combo tigger

* chore: format

* feat(combobox): apply form attributes on brnComboboxTrigger

* remove need for applyControlState

* chore: update snapshot

* docs: update container width for the responsive select demo

* fix: remove aria invalid and fix chips focus styles

* feat(field): move HlmFieldControlDescribedBy and HlmFieldA11yService into brain package

* chore: update snapshot

* feat(field): update id input handling, update styles

* docs: update form examples to required

* feat: add forceInvalid to brn-field and brn-checkbox

* allow overrides to data-invalid and data-matches-spartan-invalid

* fix: add error if ngControl.control is not defined

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
Co-authored-by: Toni Škobić <toni.skobic@gmail.com>
Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
2026-03-31 12:41:44 +02:00
Marc Stammerjohann 2715096e16 chore: bump pnpm (#1245)
* chore: bump pnpm

* chore: update ci action versions, setup pnpm w/ pnpm/action-setup and cache pnpm

* chore: remove pnpm setup for commitlint, install deps for e2e job

* chore: update checkout version for check_date job
2026-03-04 12:55:36 +01:00
Marc Stammerjohann 0f2fe5e21c feat(native-select): add new primitive (#1214)
* feat(native-select): add native-select

* feat(native-select): add form control to native select

* fix(native-select): lint issues

* feat(native-select): remove conflicting select styles

* feat(native-select): update select icon class size and input, add primtive deps

* feat(native-select): update snapshot

* docs(native-select): update meta

* feat(native-select): split model into input, linkedSignal and output to avoid model change events

* feat(native-select): update access modifier

* feat(native-select): use model for value, but keep valueChange as separate output
2026-02-19 12:38:39 +01:00
goetzrobin 114c72ec8c chore: publish only once a day 2026-02-06 18:34:56 +01:00
goetzrobin b16fb42c75 chore: try unsetting env vars to force trusted publishing 2026-02-06 11:24:07 +01:00
Robin Goetz a27d072fbb chore: fix nightly-release to work with npm trusted publishing (#1192)
currently running every 5 minutes for testing. verifying and then changing to regular schedule
2026-02-06 09:36:19 +01:00
moosme 51a579aa36 feat(repo): nx upgrade (#1002)
* feat(repo): nx upgrade

* fix: sidebar

* fix: node version

* fix: relax dependency versions

* fix: remove naming conventions

* fix: format

* fix: remove chromatic

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-11-20 10:14:26 +01:00
abiramcodes 9492ade510 fix: added field primitive to pull request template 2025-11-02 17:33:08 +05:30
moosme 7bd9eb62b1 feat(resizable): add resziable (#871)
* feat(resizable): add resizable #120

* feat(resizable): add docs

* feat(resizable): remove deps

* feat(resizable): add generator

* fix(tabs): performance

* fix: flickering

* fix: lint

* fix: add descr

* fix: run format and add descr

* fix: remove module

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-10-24 13:27:05 +02:00
Merlin 8038cc7fbe feat(item): finalize docs 2025-10-22 15:40:07 +02:00
Phuong Tran Dong 3e8b235069 feat(empty): add empty component (#925)
* feat(empty): add empty component

* feat(empty): fix page navigation

* feat(empty): fix unit test

* feat(empty): fix review comments

* feat(empty): fix lint
2025-10-15 09:52:16 +02:00
Phuong Tran Dong 1dc22594d2 feat(button-group): add new button-group component (#917)
* feat(button-group): add new button-group component

* feat(button-group): fix lint

* feat(button-group): fix format and snapshot

* feat(button-group): fix e2e test

* feat(button-group): fix review comments

* feat(button-group): fix example imports

* feat(button-group): fix review comments and apply suggestion

* feat(button-group): update template

* feat(button-group): remove role from separator

* feat(button-group): fix snapshot

* feat(button-group): remove unnessesary margin for button group separator
2025-10-13 17:05:48 +02:00
Merlin Moos 6ac2ac661b feat(kbd): add kbd 2025-10-06 23:36:48 +02:00
Merlin Moos 55e4fc9c87 Merge remote-tracking branch 'origin/main' into input-group 2025-09-30 22:17:23 +02:00
Merlin Moos 93b81dcc9c feat(input-group): align github templates 2025-09-30 22:17:14 +02:00
Merlin Moos 6906aaaf2d feat(input-group): align github templates 2025-09-30 22:16:48 +02:00
Merlin 10ee70ab86 Merge remote-tracking branch 'origin/main' into sidebar 2025-09-15 21:58:10 +02:00
Marc Stammerjohann 79ed97dbc4 feat: autocomplete (#853)
* feat(autocomplete): add autocomplete component

* add example for async filter w/ new resource
* add example for form

* feat(autocomplete): update snapshot

* docs(autocomplete): rename page selector

* feat(autocomplete): change model to input, linkedSignal and output

* feat(autocomplete): add primitive dependencies for autocomplete

# Conflicts:
#	libs/cli/src/generators/ui/primitive-deps.ts

* feat(autocomplete): copy hlm to cli

* docs(autocomplete): fix type

Co-authored-by: Ashley Hunter <ashley.hunter@hotmail.co.uk>

* feat(autocomplete): update inputs

Co-authored-by: Ashley Hunter <ashley.hunter@hotmail.co.uk>

* feat(autocomplete): adjust to input styles, add arrowDown to trigger options

* focus input on toggle button click

* fix(autocomplete): lint error

* feat(autocomplete): override hlm-command-search-input height

* feat(autocomplete): add loading state option to differentiate empty state

* feat(autocomplete): generate snapshot

* feat(autocomplete): use BrnPopover to trigger open/close

* remove syncing of the popover state

* docs(autocomplete): add api docs for helm

* feat(autocomplete): simplify styles by creating autocomplete specific command components

* feat(autocomplete): remove unused HlmCommand

* feat(autocomplete): add filter input for command, rename previous filter to search

* docs(autocomplete): remove unused form from async example

* feat(autocomplete): remove addition * from comments

* feat(autocomplete): generate snapshot

* feat(autocomplete): update searchChange comment

* feat(autocomplete): add inputs for loading and empty text

* feat(autocomplete): allow search input to be optional

* feat(autocomplete): add background to autocomplete

* feat(autocomplete): override command filter to always true

* feat(command): set command item to active on mouseenter, use host click listener

* feat(autocomplete): allow focus active on enter only when popover is open

* feat(autocomplete): update imports and dialog attachTo

* feat(autocomplete): add @spartan-ng/brain/autocomplete supporting value as T

* feat(autocomplete): update snapshot and remove focusActiveOnEnter from command

* feat(autocomplete):  allow generic for HlmAutocomplete, add objects example with countries

* feat(autocomplete): focus first item when items change

* if ther eis not active item
* if active item is not in items
* if first item is not active item

* feat(autocomplete): use brnAutocomplete in hlm-autocomplete

* feat(autocomplete): cleanup BrnAutocomplete unused config and platform

* feat(autocomplete): move options and filter out, use only filteredOptions

* update examples

* fix(autocomplete): lint issue

* feat(autocomplete): update hlm/brain exports

* feat(autocomplete): use autocomplete list styles to set max height, update id in HlmAutocomplete

* feat(autocomplete): open popover keydown/toggle if there is a search term/options to show

* hide autocomplete list when filtered options are empty
* add aria-label input for the toggle button
* add class input for empty state

---------

Co-authored-by: Ashley Hunter <ashley.hunter@hotmail.co.uk>
2025-09-09 22:39:32 +02:00
Ajit Panigrahi 78f283fd56 fix(cli): update dependencies for input-otp from cli (#865)
* fix(cli): update dependencoes for input-otp from cli

Closes Fixes #858

* fix(cli): add slider to cli

No dependencies, just adding for consistency.

* docs: include carousel & cli in github issue templates
2025-09-02 14:21:22 +02:00
Merlin Moos 4853c8d8fc feat(sidebar): initial sidebar #497 2025-08-24 21:02:52 +02:00
Merlin Moos c87ba101a8 feat(sidebar): initial sidebar #497 2025-08-23 10:08:32 +02:00
Benjamin Heiss a6f50e81b5 docs(repo): update folder structure info and other missing informatio… (#746)
* docs(repo): update folder structure info and other missing information in contributing guide

* docs(repo): fix urls, add cli scope, clean up readme (#747)

---------

Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
2025-07-07 15:06:33 +02:00
Marc Stammerjohann 5e8f93dcf3 docs(sonner): polishing (#694) 2025-05-26 12:06:31 -04:00
Ajit Panigrahi c74302d3e1 docs: rename href to link for breadcrumb links (#678)
* docs: rename  to  for breadcrumb link

* chore: update package names in scopes

* fix: remove unknown, unused hlmL directive
2025-05-02 17:46:39 +02:00
Marc Stammerjohann ef8aaa9bf0 feat: add input-otp (#639) 2025-04-10 20:14:53 +02:00
Jakub Sapała 23b13891e7 feat: toggle-group component (#634)
* feat(toggle-group): first draft with existing brn toggle group functionalities

* chore(toggle-group): add toggle-group to scope & template

* chore: move toggle-group functionality to new brn & hlm

* fix: fix error at format and lint

* fix: fix remaining eslint error

* fix: update spartan-ng/brain version for toggle-group

* fix: resolve format issue in the toggle-group

* fix(toggle-group): resolve e2e errors

* feat(toggle-group): add healthcheck migrate toggle-group

* feat(toggle-group): add argTypes in toggle-group storybook & fix format issues

* chore: delete unnecessary comments

* chore: nightly release 2025-04-02 ⚡

* chore: nightly release 2025-04-03 ⚡

* chore: nightly release 2025-04-04 ⚡

* chore: update toggle-group dependencies

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-04-08 08:53:47 +02:00
Tobias Landenberger 7022bdab9f docs: extend carousel documentation (#627)
* feat(carousel): add carousel component stories

* docs: add carousel component examples to documentation

* chore: add carousel option to pull request template

* chore: fix broken lockfile
2025-03-20 13:52:42 +01:00
robingotz 39514ff4c2 ci: set workflow on schedule and account for commit made by run 2025-01-09 16:52:01 +01:00
robingotz d9b011905d fix: set up npm token correctly 2025-01-09 16:37:10 +01:00
robingotz 856893723c fix: set up secrets tag as env variable 2025-01-09 16:24:21 +01:00
robingotz c40cff67cf fix: use correct workflow trigger 2025-01-09 15:55:59 +01:00
robingotz f668879f6b fix: auto-fix dependencies before release 2025-01-09 15:52:48 +01:00
Robin Goetz cd6e903c04 build: setup nightly release (#524)
* chore: lint and cleanup of touched files

* build: add executor to replace version for ui libs

this executor finds all package.json in the libs/ui directory
and replaces the current version
of @spartan-ng with the one defined in UI_VERSION

* build: update cli files to reflect new versions and add scripts to make publishing easier

* chore: fix linting errors

* build: update semantic release config

* build: use same VERSION env var for ui and cli

* fix: remove confusing comment

* fix: add regex only updating spartan specific versions

and a unit test to make sure we don't accidentally mess with other packages

* fix: remove .DS_Store files and filter helm packages to not add them to package.json

* chore: remove unused script

* chore: add generator that auto-increments current version of released assets

* chore: add scripts for nightly release

* chore: add nightly release workflow

* fix: add missing dash

* chore: try on push for testing

* build: auto fix version number in tools

* ci: set up automatic release and committing of changed files

* ci: give release step write permissions

* ci: check out branch correctly so we can commit it back

* ci: try to push to right place

* chore: reorder package.json

* fix: use newVersion to allow for auto increment script to work

* chore: update branch name

* fix: rename release scripts and interface and add missing generators

* chore: release cli & ui 0.0.1-alpha.379

* chore: fix name for trigger

* chore: try to push to origin nightly-release

* chore: nightly release 2024-12-10 ⚡

* chore: update tools version number

* chore: nightly release 2024-12-10 ⚡

* chore: update github flow to work on main and a schedule

* fix: add back lost test and start commands to package.json

* fix: fix tests and commit message to follow guidelines

* feat: adjust version replacement for new single brain package

* fix: use correct alpha version 381

* fix: add back storybook command to package.json

* fix: typo in @spartan-ng/brain version for pagination helm

* fix: remove tests that don't do anything and add formatting of files

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-01-08 23:53:00 +01:00
Ashley Hunter fa8785183e build: moving to pnpm, eslint and prettier (#483) 2024-11-20 22:19:10 -05:00
Ben Snyder d1cd6fb89f chore: update to Nx 19.6.5 and Analog 1.7.3 (#380)
* chore: update to Nx 19.6.5

* chore: maintenance update for biomejs, bun, and ci runs

* chore: maintenance update for biomejs, bun, and ci runs
2024-09-23 17:19:13 -04:00
Ben Snyder 8f333ee1fe feat(repo): oxlint lightning-fast linter with more code quality, correctness and performance checks (#270)
* fix(repo): require pnpm v9 with engineStrict set

* fix: bump node version to v20 LTS

* fix(repo): apply formatting and importing sorting required for CI to pass

* feat(repo): oxlint lightning-fast linter with more code quality, correctness and performance checks

---------

Co-authored-by: Robin Goetz <35136007+goetzrobin@users.noreply.github.com>
2024-04-24 15:16:51 +02:00
Ben Snyder e0db372285 fix(repo): upgrade and fix continuous integration (#269)
* fix(repo): require pnpm v9 with engineStrict set

* fix: bump node version to v20 LTS

* fix(repo): apply formatting and importing sorting required for CI to pass
2024-04-24 15:11:22 +02:00
robingotz 1757050580 ci: move from prettier to biome 2024-04-23 21:34:56 +02:00
robingotz 88e97b4bfd chore: add sonner to github templates and add helm tag 2024-03-26 11:53:47 -04:00
Esther White edc050aa96 feat(docs): adding icon to issue and PR templates (#218) 2024-03-20 11:38:18 -04:00
Marc d2b18388aa ci: update checkout and setup-node version (#202)
* fixing "Node.js 16 actions are deprecated." warnings
2024-03-12 14:08:40 -04:00
Marc 8a05e38b05 Update docs for spinner and pagination (#162)
* docs(spinner): change meta/selector/page to spinner

* docs(pagination): clean up example page

* docs(spinner): add to feature request and pr template

* docs: update roadmap
2024-02-21 17:51:20 +01:00
Sammy Mohamed ba5908f63c ci: chromtic fail on checkout issue (#153) 2024-02-14 14:00:38 +01:00