* feat(command): add style and rtl support #1399
* fix: comments
* feat(command): remove custom data-hidden is built in
* remove important from rounded
* docs(command): fix typo
* fix(command): check has search input for separator
* otherwise shows multiple separator while searching in the scrollable example
---------
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
- Remove unused HlmDrawerHandle directive
- Add static touch-action: none to .spartan-drawer-content in all
style files so iOS Safari does not hijack the gesture before the
pointerdown handler fires
- Set _openTime via effect on dialog state open instead of on first
pointerdown, so the 500ms cooldown starts when the drawer opens
rather than eating the user's first drag
Chromium renders native select option popups using the select's
translucent dark background, breaking contrast in dark mode. Style
options and optgroups with the Canvas/CanvasText system colors so the
dropdown adapts to the active color-scheme, matching shadcn.
Closes#1426
Emit the spartan-slider-ticks marker so the ticks container padding, which
offsets ticks to the thumb center, is defined per registry style instead of a
fixed px-1.5. The previous fixed padding assumed a 12px thumb, so ticks were
misaligned for styles with larger thumbs (luma, vega, mira, maia). Set the
padding to each style's thumb radius across luma, vega, lyra, nova, mira and
maia, for both horizontal and vertical orientations.
Closes#1455
Add reporters: ['default'] to the mcp, cli, tools, registry and cli-smoke vite
configs (brain and helm already had it). Without a default reporter the @nx/vitest
NxReporter is the only one attached, so these projects printed no summary in CI -
which is how mcp's silently-undiscovered specs stayed invisible. The counts are
now shown so test execution is verifiable at a glance.
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.
Address review feedback on the PR. Wire the directive to ngx-scrollbar's
real CSS variables at shadcn's values (transparent 10px track, 7px
bg-border thumb) and default visibility to hover so the thumb only shows
on hover, scroll or focus like shadcn.
Move the container radius into the registry per style now that the demo
no longer hardcodes it: rounded-md for vega/nova/mira, square for lyra
via --radius 0, and rounded-2xl for maia/luma. Replace the dead
radix-era marker rules with a single spartan-scroll-area rule.
Declare ngx-scrollbar as a helm peer dependency since the directive now
imports from it, and mirror the changes in the CLI template.
Address review feedback on the style support. Set Lyra's --radius to 0
so the bordered container and handle render sharp like shadcn's Lyra
preset, and round the Lyra handle grip with the shared rounded-lg token
so the squaring comes from --radius rather than a special case.
Match shadcn's splitter focus ring by using ring-offset-background in
place of the fixed ring-offset-1 offset, in both the helm component and
the CLI template.
* docs(button-group): add rtl example
* fix(button-group): make border styles rtl
* fix: update other styles and fix radio indicator
* chore: format
* fix: use absolute pos for dropdown menu radio
* chore: format
* docs(button-group): rotate icon
* docs(button-group): rotate icon
* docs(button-group): provide directionality
Emit the spartan-slider-track, spartan-slider-range and spartan-slider-thumb
markers so the per-style track height, corner radius, thumb size and thumb border
defined in the registry styles apply at runtime across vega, nova, maia, lyra,
mira and luma, matching shadcn. Correct the mira track height to match shadcn.
Enable the docs theme switcher and show all styles.
Emit the spartan-switch and spartan-switch-thumb markers so the per-style track
size, border width, corner radius and thumb size/offset defined in the registry
styles apply at runtime across vega, nova, maia, lyra, mira and luma, matching
shadcn. Add a data-size attribute to the brn-switch button and a data-state
attribute to the thumb so the registry's size- and state-keyed rules resolve, and
make the checked thumb translate direction-aware (ltr/rtl) so it animates
correctly under RTL. Enable the docs theme switcher and show all styles.
* feat(repo)!: upgrade nx to 22 and angular to 21
Upgrade the workspace to Nx 22.7.5 and Angular 21.2.16, and widen the
published peer dependency ranges to support Angular 21 and 22 while
dropping Angular 20.
- nx and @nx/* to 22.7.5; @angular/* to 21.2.16 (framework) and 21.2.14
(cli, build, devkit, cdk, ssr)
- brain, helm and trpc @angular/* peers to ">=21.0.0 <23.0.0"; the helm
embla-carousel-angular peer uses the same range
- @spartan-ng/cli minimums raised to >=21 and @schematics/angular to
21.2.14; the private tools lib aligned to nx 22 / angular 21
- analog 2.6.0, ng-packagr 21, angular-eslint 21, storybook 10, jest 30,
@testing-library/angular 19 and related tooling
- replace the calendar select host-listener $event with a typed output
subscription; constrain the ai-chat-link directive to anchors
- drive the menubar e2e arrow keys via native keydown and disable
Chromium throttling; hold cypress at 14 (15 breaks realPress specs)
BREAKING CHANGE: Angular 20 is no longer supported. spartan/ui now
supports Angular 21 and 22.
* ci: lower unit test parallelism to fit the runner memory
The docs app's vitest + Analog suite peaks at a few GB; running it
alongside two other test projects under --parallel=3 exhausted the
GitHub runner memory and the worker was OOM-killed with no output.
Run at most two test projects concurrently.
* fix(trpc): drop invalid environment providers from the test env module
The Nx 22 migration wrapped provideZoneChangeDetection() in an @NgModule,
but EnvironmentProviders are not valid in @NgModule providers and Angular
21 throws NG0207 at runtime. Restore the plain initTestEnvironment setup
(matching the docs app); the explicit zone provider is unnecessary.
* ci: run the docs app test suite in isolation
Bundling the docs app's vitest + Analog suite into the parallel test run
made it fail in CI while it passes on its own, and the interleaved output
hid the cause. Run the other projects in parallel, then the docs app as a
separate step.
* fix(nx): point test cache inputs at the real jest preset file
The test targets' cache inputs referenced jest.preset.js, but the
workspace preset is jest.preset.cjs, so the input never matched and a
preset change would not invalidate the cache. Fix both the
@nx/vitest:test target (added by the Nx 22 migration) and the existing
@nx/jest:jest target.
* ci: log exit code and retry the docs app test suite once
The docs app's vitest + Analog suite intermittently crashes in CI right
after loading Angular's testing modules, with no error output. Log the
exit code to classify the crash (128+signal indicates a native crash)
and retry once so a flaky crash does not fail the run while the root
cause is investigated.
* ci: clarify docs app test retry after pinpointing the flaky crash
The crash is in app.spec.ts: booting the full app shell (Header/Footer
and their deep import graph) intermittently crashes the vitest worker
during the Analog transform in CI (exit 1, no output, not reproducible
locally). It happens before any test runs, so a vitest per-test retry
cannot help; re-running the suite once does.
* chore(repo): hold analog at 2.1.3 and drop unit-test ci workarounds
Analog 2.6.0 intermittently crashed the docs app's vitest worker in CI
(a flaky transform of the app shell), so keep analog at the nx-migration's
tested 2.1.3, revert the marked bumps that 2.6.0 required, and restore the
ai-chat-link directive selector. Also restore the original unit test ci
step, dropping the parallel, isolation and retry workarounds added while
chasing that crash.
* feat(date-picker): add date-picker-trigger, use button styles, add forceInvalid
* fix(date-picker): lint issue and update snapshot
* fix(date-picker): add trigger to test
* fix(date-picker): cleanup imports
* docs(date-picker): add for to label
* docs(date-picker): use trigger in blocks
* docs(date-picker): add rtl example
* feat(date-picker): use trigger in story
* feat(date-picker): add header and footer slot for calendar, update block example
* add showTrigger input
Remove the invalid hsl() wrapper around the sidebar menu button outline
shadow across all themes. The --sidebar-border and --sidebar-accent tokens
are already oklch() color values, so hsl(var(--sidebar-border)) produced
invalid CSS and the box-shadow was dropped. Use the bare var() reference to
match shadcn.
Also align the vega button with the shadcn vega preset:
- secondary variant hover uses color-mix instead of bg-secondary/80
- size-lg inline-icon padding uses pr-2/pl-2 instead of pr-3/pl-3
* feat(native-select): add style support, rtl example, add forceInvalid
* fix(native-select): center icon correctly considering the text-xs/relaxed for default size
* feat(sonner): add style support
* fix(select): trigger icon placement when no value/placeholder is available
* feat(field): add style support, add rtl example
* fix(field): rename to spartan-*
* docs(sonner): remove duration
* docs(field): fix translation value
* fix(sonner): merge toast options to keep the default styles
* feat(empty): add styles support
* feat(empty): add rtl and input group examples
* feat(label): support styles and add rtl example
* feat(input-otp): add styles support
* feat(input-otp): add rtl and other examples
* chore: copy hlm to cli
* feat(input-otp): update snapshot
* fix: class names
* feat(skeleton): support styles, add more examples and rtl
* feat(table): support styles, update selectors, add more examples and rtl
* docs: cleanup key