Commit Graph

51 Commits

Author SHA1 Message Date
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
Ashley Hunter cd932da378 fix(select): keep panel closed after committing a value with the keyboard
Address review feedback on the overlay lifecycle:

- the select trigger re-read its expanded state after selectActiveItem() had
  already closed the panel, so Enter/Tab fell through and re-opened the
  overlay via reopen(); capture the expansion state up-front so a commit no
  longer re-opens on the same keypress
- make the overlay id atomic (++overlaySequence) so the duplicate-id guard and
  the ref share the same counter, matching brn-dialog.service.ts
2026-06-16 23:23:29 +01: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
Youssef Chaygani c5afdcdabf fix: allow undefined in value model signals for autocomplete, combobox, and select (#1423)
* fix: allow undefined in value model signals for autocomplete, combobox, and select

Closes: #1387

* fix(select): guard undefined in select/select-multiple key-manager effect values

* feat: explicit check for undefined value

---------

Co-authored-by: Marc Stammerjohann <8985933+marcjulian@users.noreply.github.com>
2026-06-08 12:17:50 +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 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
oussema sahbeni 33211b2ddc refactor(select): rename 'dir' to 'direction' for consistency across components, remove dir input 2026-01-06 19:53:21 +01:00
oussema sahbeni 2802a976d0 fix(select): inject Directionality and update dir handling 2026-01-03 10:52:21 +01:00
moosme b686a5863f fix(select): remove tw classes from brain #1088 (#1089)
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-12-17 13:32:11 +01:00
moosme 90060b1a0c fix(select): selected item can be toggled out #1054 (#1077)
* fix(select): selected item can be toggled out #1054

* fix: add test

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-12-15 17:43:27 +01:00
Marc Stammerjohann 11d5b4390c chore: add types to inputs for the docs api (#1062) 2025-12-04 12:37:22 +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
Merlin Moos 4160d4a350 Merge remote-tracking branch 'origin/main' into component-template
# Conflicts:
#	libs/brain/alert-dialog/src/lib/brn-alert-dialog-overlay.ts
#	libs/brain/alert-dialog/src/lib/brn-alert-dialog.ts
#	libs/brain/avatar/src/lib/brn-avatar.ts
#	libs/brain/dialog/src/lib/brn-dialog-overlay.ts
#	libs/brain/dialog/src/lib/brn-dialog.ts
#	libs/brain/popover/src/lib/brn-popover.ts
#	libs/brain/radio-group/src/lib/brn-radio.ts
#	libs/brain/select/src/lib/brn-select-value.ts
#	libs/brain/sheet/src/lib/brn-sheet-overlay.ts
#	libs/brain/sheet/src/lib/brn-sheet.ts
#	libs/brain/tooltip/src/lib/brn-tooltip-content.ts
#	libs/helm/accordion/src/lib/hlm-accordion-content.ts
#	libs/helm/alert-dialog/src/lib/hlm-alert-dialog-content.ts
#	libs/helm/alert-dialog/src/lib/hlm-alert-dialog-footer.ts
#	libs/helm/alert-dialog/src/lib/hlm-alert-dialog-header.ts
#	libs/helm/alert-dialog/src/lib/hlm-alert-dialog.ts
#	libs/helm/avatar/src/lib/hlm-avatar.ts
#	libs/helm/carousel/src/lib/hlm-carousel-content.ts
#	libs/helm/carousel/src/lib/hlm-carousel-item.ts
#	libs/helm/carousel/src/lib/hlm-carousel-next.ts
#	libs/helm/carousel/src/lib/hlm-carousel-previous.ts
#	libs/helm/carousel/src/lib/hlm-carousel.ts
#	libs/helm/dialog/src/lib/hlm-dialog-content.ts
#	libs/helm/dialog/src/lib/hlm-dialog.ts
#	libs/helm/sheet/src/lib/hlm-sheet.ts
#	tools/eslint-rules/index.ts
2025-11-12 23:38:47 +01:00
Merlin Moos fd3229abe6 fix: add order 2025-11-12 23:08:18 +01:00
Ashley Hunter 5e0eea508f build: converting styles 2025-11-12 21:39:29 +00:00
Ashley Hunter 87715502c4 build: eslint rule for styles and encapsulation 2025-11-12 21:33:40 +00:00
Merlin 6d60dc9d7d feat: add lint rule template last 2025-11-12 15:05:31 +01: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 c6e6387739 refactor: align eslint rules 2025-09-29 15:59:20 +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
moosme 5a326b435b fix: fix event bubbling issues and other control value accessor bugs (#874)
* chore: nightly release 2025-08-24 ⚡

* chore: nightly release 2025-08-25 ⚡

* chore: nightly release 2025-08-26 ⚡

* fix: prevent event bubbling

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-09-15 14:00:57 +02:00
moosme 5def645d0c Id generation (#864)
* chore: nightly release 2025-08-24 ⚡

* chore: nightly release 2025-08-25 ⚡

* chore: nightly release 2025-08-26 ⚡

* chore: nightly release 2025-08-27 ⚡

* chore: nightly release 2025-08-28 ⚡

* feat: start component id by 1 #863

---------

Co-authored-by: Leonidas <leonidas@spartan.ng>
2025-08-31 18:21:00 +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
Sammy Mohamed a221a802e8 docs: exclude test and mocks from ui docs (#849) 2025-08-24 12:38:27 +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
Robin Goetz 3872b50dfd fix(command,select,slider,input): use forward refs when providing injection token (#743) 2025-07-03 09:25:13 +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 ae2c88202b fix(select): keyboard value toggle (#692) 2025-05-18 15:00:24 -04:00
Leonidas 313fe1701b chore: nightly release 2025-05-14 ⚡ 2025-05-14 01:16:50 +00:00
Marc Stammerjohann b90984b2f6 refactor: enforce eslint prefer onpush change detection (#688) 2025-05-14 02:41:54 +02:00
Ashley Hunter 9b654631cc build: nx version updates (#672) 2025-04-27 12:54:23 +02:00
Ashley Hunter a844f33253 fix(select): multi select defaults to empty array (#667) 2025-04-22 07:57:03 +02:00
Ashley Hunter 08115b3a30 fix(select): correcting placeholder color (#649) 2025-04-09 11:35:55 +02:00
Conor Owens 8ca36f4595 fix(select): use toggle select for multi and set as null when empty array (#646)
Co-authored-by: ConorOwens <cowens@intsys-solutions.com>
2025-03-27 00:34:55 +01:00
Ashley Hunter 2a8c5d1eef feat: angular 19 (#612) 2025-03-17 22:58:33 +01:00
yannickboetzkes bb88c1ffd8 chore(select): format 2025-03-07 19:18:06 +01:00
yannickboetzkes f9eaca89b2 fix(select): use compare with function
Use compare with function when deselecting options as well
2025-03-07 19:09:37 +01:00
yannickboetzkes 1473f6c8d5 fix(select): use compare with function
Ensure correct behavior on select value level when compare function is provided
2025-03-07 18:54:36 +01:00
Ashley Hunter 9127e8b8e4 fix: select fixes and cleanup (#614)
* refactor: select updates

* fix: select fixes

* feat: add migrations
2025-02-28 07:22:28 +01:00
Sammy Mohamed 0eb4c2fa31 feat(select): add valueChange output (#605)
* fix: select initial value story

* feat(select): add valueChange output
2025-02-18 10:53:16 +01:00
Sammy Mohamed f9c543a821 fix(select): select dynamic options (#571) 2025-02-11 19:26:15 +01:00
Robin Goetz 7740096654 fix(select): make scrollUpBtn and scrollDownBtn optional (#579)
closes #547
2025-02-10 15:24:52 +01:00
Ashley Hunter 74d4016e1f refactor: move core to brain (#548)
* refactor: move core to brain

* refactor: migrating core imports

* refactor: updating deps

* refactor: updating generator

* refactor: fixing import

* refactor: updating cli

* refactor: updating templates

* fix: merge latest changes

* fix: tests
2025-01-08 23:12:22 +01:00
Ashley Hunter 5313d244ec build: rxjs 6 support (#525)
* build: rxjs 6 support lint rule

* build: rxjs 6 support

* build: rxjs 6 support
2024-12-11 16:00:32 +01:00