Commit Graph

32 Commits

Author SHA1 Message Date
Ashley Hunter ed9328f867 test(select): cover keyboard open, commit-and-close, and focus model
Guards the regression where committing with Enter re-opened the panel, plus
Escape-to-close and the trigger keeping focus while navigating.
2026-06-16 23:56:56 +01:00
Patrick 803614a7bb test: update overlay api snapshots 2026-06-13 14:48:23 -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
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
Phuong Tran Dong 8ec384b7a1 fix(select): select trigger icon vertical alignment (#1425) 2026-06-07 20:19:24 +02:00
Marc Stammerjohann 7e9393aa1d feat(select): add style support, add forceInvalid, add rtl and invalid example 2026-06-03 11:28:45 +02:00
Marc Stammerjohann 9e527ee1a2 feat: add style support to native-select, sonner, field (#1375)
* 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
2026-06-01 14:09:41 +02:00
Marc Stammerjohann f585b9e2e5 feat: track autocomplete/combox/select input/trigger width (#1336)
* feat(select): track trigger width changes

* feat(combobox): track input width changes

* feat(autocomplete): track input width changes

* feat: update snapshot

* feat: use injectElementSize to track input/trigger width changes

* feat: add getBoundingClientRect() as fallback for potential offsetWidth = 0 in safari

* feat: update snapshot
2026-04-30 15:00:36 +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 60ee3dd816 feat(select): refactor template structure (#1277)
* feat(select): refactor select brain/helm

* refactor(select): comment out select

* feat(select): add more examples

* feat(select): add placeholder input to hlmSelectValue

* feat(select): add placeholder text for select value and custom placeholder

* feat(select): add select values

* feat(select): add select-value-template

* feat(select): handle scroll up/down elements

* feat(pagination): use hlm-select

* feat: update snapshot

* fix: lint

* fix(select): update hidden access

* feat(select): update on ai review

* feat(select): add migration and healthcheck

* feat(select): set active item on open, either first or the selected value

* for multiple the last value

* feat(select): make scroll up/down smoother and add showScroll to select content

* feat(calendar): change selectof for month/year select

* feat(select): remove unused importAlias from select migration

* feat(select): dogfeed migration

* fix(select): use placeholder from brn-select

* feat(select): improve keyboard navigations

* open on enter
* select active item on tab

* feat(select): more dogfeeding of the migration, fix placeholder replacement

* fix(select): healthcheck test, as BrnSelectImports is removed w/ brnSelect migration

* fix: lint

* feat(select): improve a11y and update tests

* feat(select): update snapshot

* fix(select): allow empty string to be resolved
2026-03-24 10:41:44 +01:00
Marc Stammerjohann dc9c2d77eb chore: update nx and angular 20.3 (#1232)
* chore: update nx and angular 20.3

# Conflicts:
#	pnpm-lock.yaml

* chore: fix lint issues

* chore: update tailwind and prettier
2026-03-04 10:03:14 +01:00
Marc Stammerjohann 4d6d4a150b docs: add reactive forms guide (#1223)
* docs: remove form soon component

* docs: rename components page selector and page

* chore: remove unused ng-signal-forms

* docs: add reactive forms page and demo

* docs: add exact to link, mark forms as new

* docs: use signal input and resource for code block

* docs: add form and reset section

* docs: add validation and displaying error section

* feat(select): add select separator

* docs: add different input field types demos

* docs: revert code block signals

* docs: center form text

* docs: replace wip badge w/ text, as the badge is not aligned correctly to the text
2026-02-25 16:50:52 +01:00
Marc Stammerjohann 04d568c7cc chore: format classes functions 2026-01-05 11:38:23 +01:00
oussema sahbeni 6eeffa252e fix(select): update padding classes for RTL support in select option 2025-12-28 19:08:42 +01:00
Ashley Hunter 3c0ab73226 refactor: replace hlm with new classes utility (#1086)
* feat: adding classes util

* fix: improving hlm

* fix: classes

* fix: classes tests and linting

* feat: adding tests

* fix: perf

* fix: perf improvements

* test: fixing tests
2025-12-22 16:06:40 +01:00
moosme a3398cf41c fix: avoid icon color overwrite #1025 (#1033)
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-11-20 18:09:57 +01:00
Merlin Moos fd3229abe6 fix: add order 2025-11-12 23:08:18 +01:00
Merlin 6d60dc9d7d feat: add lint rule template last 2025-11-12 15:05:31 +01:00
Merlin 64f82d8b79 feat(item): run format all 2025-10-22 15:40:07 +02:00
Sammy Mohamed 420d139827 feat(select): polishing (#839)
* fix(select): remove tailwindcss class from brn

* fix(select): adds mising token exports

* docs: select 3rd party call about section

* fix: improved select text overflow styling

* fix: section intro spacing

* docs(select): 3rd party link

- format
2025-10-14 09:27:52 +02:00
Merlin 9e34f79ded refactor: consistent type import 2025-09-29 14:42:31 +02:00
moosme adf55dbdd3 refactor: polish imports (#890)
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-09-27 17:52:14 -04:00
Marc Stammerjohann 9f4484fabf feat: add prettier tailwind function sorting config and docs (#842)
* chore: rename prettier config

* chore: configure tailwind to sort hlm and cva functions

* docs: add sorting classes section to installation guide

* explain how to sort classes in hlm and cva functions
* update TailwindCSS to Tailwind CSS

* chore: format hlm and cva tailwind classes
2025-09-01 12:11:35 +02:00
Sammy Mohamed 6b5be28a94 fix(select): voiceover navigatability and typehead restored (#782)
- fix focus styling

Co-authored-by: Ashley Hunter <ashley.hunter@hotmail.co.uk>
2025-08-31 18:20:19 +02:00
moosme 556a3a5133 Export hlm from brain to helm (#856)
* chore: nightly release 2025-08-24 ⚡

* chore: nightly release 2025-08-25 ⚡

* chore: nightly release 2025-08-26 ⚡

* feat: move hlm from brain to hlm #843

* feat: add utils installation #843

* feat: move tailwind-merge to dependencies #840

* fix: fix tests and add utils test

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-08-31 18:14:40 +02:00
Ashley Hunter b1ed68e0d0 refactor: use the latest angular naming conventions (#766)
* refactor: use the latest angular naming conventions

* build: merge

* docs: fixing unexpected component rename

Co-authored-by: Ajit Panigrahi <ajitzero@gmail.com>

* build: fix generated code

* build: fixing build

* build: fix directive

* feat: adding helm migration

* build: health check detection improvements

* build: checking file type

* build: fix formatting

---------

Co-authored-by: Ajit Panigrahi <ajitzero@gmail.com>
2025-07-30 22:32:02 +02:00
MerlinMoos ced805c807 fix: make access modifier consistent #755 (#758)
* fix: make access modifier consistent #755

* fix: run format

* fix: resolve build issues

---------

Co-authored-by: Merlin Moos <merlin.moos@oldendorff.com>
2025-07-22 17:43:20 +02:00
Sammy Mohamed 42869fb033 fix: classvalue typing inconsistencies (#774) 2025-07-18 20:36:44 +02:00
Ashley Hunter e66a64d76b feat: new york theme (#711)
* feat: new york theme

* refactor: toggle group

* fix: colors

* fix: tests

* docs: updating previews

* fix: updating previews

* build: resolve build failure

* fix: review fixes

* fix: build

* build: adding generated files
2025-07-09 18:40:19 +02:00
Jeevan fb3d95a340 Remove standalone property (#701)
* feat: remove standalone property from various directives and components in the Helm UI library

* feat: enable strictStandalone option in Angular compiler settings
2025-06-10 22:00:48 +02:00
Ashley Hunter 0eeeb17b1a refactor: helm secondary entrypoints 2025-05-29 20:59:16 +01:00