Commit Graph

846 Commits

Author SHA1 Message Date
Leonidas 33892b9bcb chore: add new contributors to our 300 2026-06-18 10:22:30 +00:00
moosme 9236788c8f Merge pull request #1495 from mehrabix/feat/provide-spartan-hlm
feat(utils): add provideSpartanHlm utility to fix CDK overlay z-index…
2026-06-18 08:29:44 +02:00
Ashley Hunter 39236d3235 test(cli): run migrate-helm-libraries end-to-end as an installed package
No cell exercised the headline command as a published package, so the deep-import
breakage above shipped undetected. Each nx cell now runs migrate-helm-libraries
against the freshly scaffolded workspace before generating anything: with no spartan
libraries it no-ops ("No libraries to migrate") without prompting, but loading it
resolves the @nx/workspace/@nx/devkit deep imports in the installed CLI - so a
consumer's stricter exports map turns the cell red instead of reaching users.
2026-06-17 19:29:54 +01:00
Ashley Hunter 1f138b14b2 test(cli): cover all components on nx and harden the cli-smoke cell matrix
- Add an all-components-nx-entry cell: all primitives as buildable secondary
  entrypoints on nx. This is the shape that previously crashed with "Invalid string
  length" and is now the regression guard for that fix. The existing all-components
  cell stays on angular-cli.
- Fix per-cell filtering: describe.each('$id') rendered the id wrapped in quotes
  (e.g. 'nx-entry-buildable'), so the CI --testNamePattern matched nothing and every
  cell silently skipped. Use a plain describe(cell.id) loop for clean names.
- Disable the nx daemon in the throwaway workspaces. Under 50+ back-to-back generators
  it intermittently crashed with "Failed to process project graph"; daemonless is
  reliable and faster (no slow daemon retries).
- Register the new cell in the cli-smoke workflow matrix so the drift-guard passes.
2026-06-17 18:54:10 +01:00
mehrabix f396e32df9 feat: add provideSpartanHlm utility to fix CDK overlay z-index conflict
In Angular 21, the CDK overlay defaults to using the popover attribute,
which causes overlay-based components (sheets, dialogs, tooltips) to
always render above position: fixed elements like hlm-toaster. This
adds a provideSpartanHlm() utility that configures OVERLAY_DEFAULT_CONFIG
with usePopover: false, and documents the issue in the sonner docs.

Closes #1280
2026-06-17 19:08:20 +03:30
Ban117 7ada58e03d fix(select): select option with a falsy value on enter keypress (#1493)
selectActiveItem() guarded the commit with a truthiness check (if (value)), so an
option whose value is falsy (false, 0, '') was dropped: pressing Enter just closed
the panel without selecting. Check value !== null && value !== undefined instead, so
a defined falsy value is committed while a missing active item still closes. Applies
to both BrnSelect and BrnSelectMultiple.

Co-authored-by: Benjamin <benjamin@amcbanking.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-17 15:47:28 +02:00
moosme 01aeb5a231 feat(navigation-menu): add style support #1408 (#1490)
* feat(navigation-menu): add style support #1408

* fix: review

* feat(navigation-menu): add align input to navigation-menu-trigger

* add align example

* feat(navigation-menu): add navOffset

* docs(navigation-menu): update example ids

* feat(navigation-menu): add guard in updateAlign

* feat(navigation-menu): remove group from trigger

* feat(navigation-menu): remove unused data-popup-open classes

* navigation-menu doesn't have data-popup-open attribute

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
2026-06-17 15:43:07 +02:00
Leonidas 9849f9cd72 chore: add new contributors to our 300 2026-06-17 10:58:34 +00:00
Ashley Hunter d2f40d3014 Merge pull request #1471 from PatrickLarocque/fix/overlay-lifecycle
refactor!: split dialog and overlay portal lifecycles
2026-06-17 10:16:35 +01:00
moosme 8cf3775943 Merge pull request #1489 from marcjulian/feat/remove-unused-styles 2026-06-17 08:07:19 +02:00
Ashley Hunter 0c3b653902 Merge origin/main into fix/overlay-lifecycle
Resolve brn-dialog.service.ts conflict: drop the deprecated injectBrnDialogCtx
alias (removed on main during the pre-1.0 audit) and keep the typed
injectBrnDialogContext with the unknown default.
2026-06-16 23:22:47 +01:00
moosme 263648ade1 feat(command): add style and rtl support #1399 (#1488)
* 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>
2026-06-16 18:48:35 +02:00
Marc Stammerjohann 98ca3b7ae7 docs(popover): update basic example 2026-06-16 18:08:13 +02:00
Marc Stammerjohann 346c06eaab docs(popover): add align example 2026-06-16 17:26:33 +02:00
Marc Stammerjohann a0687ae64b feat(popover): add header, title and description 2026-06-16 17:21:28 +02:00
Marc Stammerjohann 27305c73c0 feat: dropdown and context menu styles, rtl example (#1486)
* feat(dropdown-menu): add style support, add sub trigger

* feat(dropdown-menu): update snapshot

* feat(context-menu): add rtl and more examples, enable styles

* remove spartan-context-* classes as it reuses dropdown-menu

* feat(menubar): remove unused spartan-menubar-* styles, update examples

* fix(dropdown-menu): remove duplicate styles which dropdown-menu-item already applies

* docs(context-menu): fix id

* docs: update examples

* feat(dropdown-menu): make checkbox/radio group scoped

* fix(dropdown-menu): fix rtl styles

* feat(dropdown-menu): add internal comment

* feat(dropdown-menu): add ng-icon styles for item-indicator

* docs(menubar): update preview
2026-06-16 16:33:33 +02:00
Marc Stammerjohann 05463a6955 fix: ignore copilot from contributors (#1487) 2026-06-16 16:13:34 +02:00
Leonidas 0475400815 chore: add new contributors to our 300 2026-06-16 11:12:27 +00:00
Juan Valero 50c54ac29c docs: add tailwind configuration guide for Jetbrains-based IDEs (#1482) 2026-06-16 00:40:21 +02:00
moosme 457b7190cc feat(menubar): add style support (#1474)
* feat(menubar): add style support

* fix: review

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2026-06-15 15:52:30 +02:00
Ahmad Mehrabi 715499fe4e feat(date-picker): add Jalali (Persian) calendar support (#1429)
* feat(date-picker): add Jalali (Persian) calendar support

- Add pure Jalali calendar math algorithms (no npm packages)
- Add JalaliDate class with valueOf() for reliable calendar comparison
- Add BrnJalaliDateAdapter implementing BrnDateAdapter<JalaliDate>
- Add comprehensive unit tests for all adapter methods
- Add Persian (Farsi) calendar i18n with RTL layout
- Add Jalali date picker example to docs page
- Add Storybook story with Persian locale
- Extend TranslateService to support 'fa' language

* feat(date-picker): add Jalali (Persian) calendar support

Add pure Jalali calendar math, JalaliDate class, and BrnJalaliDateAdapter with tests.

Move example from component docs to blocks/calendar page per PR review.

* refactor: clean up jalali date-time code

- Deduplicate JALALI_MONTHS array in calendar i18n files
- snake_case to camelCase in PersianDate (gregorianDaysInMonth, jalaliDaysInMonth)
- Expand cryptic param names (j_y to jalaliYear, g_y to gregorianYear, etc.)
- Remove parseInt() no-ops on typed number params
- Remove getMonthName (i18n concern, not calendrical)
- Destructure tuples with descriptive names across adapter/date/persian-date
- Fix month+day add drift: clamp day after month step before day arithmetic

* style: fix long line formatting to pass nx format check

* fix(date-picker): resolve merge conflicts from upstream and stashed changes

Merge descriptive variable names (_constrain, parseInt, getMonthName,
full descriptive names) with upstream descriptive names. All tests pass.

* refactor: remove parseInt unwrapping and getMonthName, add PersianDate tests
2026-06-15 15:05:30 +02:00
Leonidas 5435594148 chore: add new contributors to our 300 2026-06-15 12:16:48 +00:00
mehrabix 94a57f4eee Merge remote-tracking branch 'origin/main' into feat/drawer-component 2026-06-14 18:49:54 +03:30
mehrabix dec0ce4401 feat(drawer): add RTL example, pointer-events guard, and fix input spacing
Add RTL preview example with EN/AR/HE translations,
pointer-events:none on body while drawer is open (removed with 300ms
delay on close), and replace div.px-4 with hlm-field-group for proper
spacing.
2026-06-14 13:14:33 +03:30
mehrabix 522153e44e fix(drawer): add showThemeToggle to drawer page
Co-authored-by: moosme <46927822+MerlinMoos@users.noreply.github.com>
2026-06-14 13:14:25 +03:30
Patrick 3052af3fd0 fix: restore non-modal popover dismissal 2026-06-13 19:25:04 -04:00
Patrick 61d2ee60bf test: cover dialog launched from context menu 2026-06-13 15:18:06 -04:00
Patrick 803614a7bb test: update overlay api snapshots 2026-06-13 14:48:23 -04:00
Patrick c7fb7469d6 fix: restore overlay dismissal semantics 2026-06-13 14:32:40 -04:00
Patrick ba74c53c97 refactor: split dialog and overlay primitives 2026-06-13 14:32:40 -04:00
Patrick 179ec6af8f fix: coordinate overlay lifecycle with animations
Replace fixed close delays with lifecycle-driven disposal so overlays remain responsive.
Wait only for exit animations that actually start and centralize Escape, backdrop, and
outside-pointer dismissal.

BREAKING CHANGE: remove the closeDelay input and configuration option. Remove explicit delay
values; closed-state exit animations are now detected automatically.
2026-06-13 14:32:40 -04:00
mehrabix 2e3059c8a2 feat(drawer): add drawer component with brain primitive and helm styling 2026-06-13 21:31:07 +03:30
Ashley Hunter 16ecd13eab test: surface vitest test counts in CI logs for the node projects
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.
2026-06-13 17:35:00 +01:00
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
Marc Stammerjohann 68ce4bdd89 docs: add signal forms examples (#1463)
* docs: remove new flag from a few pages

* docs: add signal forms examples

* docs: remove required validation
2026-06-12 16:22:10 +02:00
moosme 33299063ad Merge pull request #1462 from marcjulian/feat/sheet-styles
feat(sheet): add style support, rtl and more examples
2026-06-12 16:10:13 +02:00
moosme 23e2d705c8 Merge pull request #1454 from marcjulian/feat/sidebar-styles
feat(sidebar): add style support and rtl example
2026-06-12 16:09:43 +02:00
Marc Stammerjohann 24811b0e91 docs(sidebar): rename dropdown menu template 2026-06-12 15:16:16 +02:00
Marc Stammerjohann 00f740cb64 feat(sidebar): adjust styles for rtl, add rtl example 2026-06-12 13:18:09 +02:00
Marc Stammerjohann 5d246e7fd2 docs(sheet): add button imports 2026-06-12 11:50:07 +02:00
Marc Stammerjohann 84ed84f8a8 docs(sheet): update side for rtl 2026-06-12 11:16:59 +02:00
Marc Stammerjohann d5a5aa1f7a feat(sheet): add style support, rtl and more examples 2026-06-12 11:13:43 +02:00
Ashley Hunter 859676a41a feat!: drop Tailwind CSS v3 support (#1460)
spartan/ui is now Tailwind CSS v4 only. The v3 compatibility layer added
complexity across the brain preset, the CLI generators and the docs, all of
which is removed here.

Brain:
- Delete the v3 JavaScript preset (hlm-tailwind-preset.js) and its package
  export; the v4 CSS preset (hlm-tailwind-preset.css) is now the only preset.
- Bump the tailwindcss peer dependency to >=4.0.0 and declare tw-animate-css
  as a peer, since it is imported by the CSS preset.

CLI:
- Remove Tailwind version detection and the v3 confirmation prompt; the theme
  generator always emits the v4 stylesheet (preset import plus OKLCH theme).
- Drop the legacy HSL theme table, the v3-only CDK overlay import branch, the
  vestigial addCdkStyles option and the unused registryItemTailwindSchema.

Docs and tooling:
- Remove the Tailwind v3 installation and theming sections and snippets.
- Drop autoprefixer; Tailwind v4 handles vendor prefixing via @tailwindcss/postcss.

BREAKING CHANGE: Tailwind CSS v3 is no longer supported. The
@spartan-ng/brain/hlm-tailwind-preset (JS) package export has been removed; use
the @spartan-ng/brain/hlm-tailwind-preset.css preset with Tailwind CSS v4. The
tailwindcss peer dependency now requires >=4.0.0.
2026-06-12 00:39:14 +02:00
Ashley Hunter 98b0395f41 Merge pull request #1456 from spartan-ng/feat/cli-smoke-harness 2026-06-11 21:33:30 +01:00
Ashley Hunter f52f1ea6c6 chore(cli): apply review feedback on the smoke harness
- Remove the acceptTailwindV3 flag from the theme and init generators. It was a leftover from
  when the matrix covered Tailwind v3; the suite is v4-only and v3 support is being dropped.
- Publish packages via execFileSync with an argument array so the registry and npmrc values
  are never interpreted by a shell.
- Drop the explanatory embla-carousel import comments from the carousel template and helm source.
2026-06-11 18:07:11 +01:00
Marc Stammerjohann 5a43bf7054 docs(dialog): use hlmFieldLabel 2026-06-11 16:42:58 +02:00
Marc Stammerjohann f2015b49c9 docs(dialog): update variable names 2026-06-11 16:32:09 +02:00
Marc Stammerjohann 4997940e6d docs(dialog): add rtl and more examples 2026-06-11 16:30:34 +02:00
Marc Stammerjohann 3c03ca82d0 feat(dialog): add style support 2026-06-11 12:48:34 +02:00
Marc Stammerjohann 65e30c63f7 fix(dialog): inside a menu, move out of the ng-template, closes #1225 2026-06-11 12:13:01 +02:00