Commit Graph

26 Commits

Author SHA1 Message Date
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
Marc Stammerjohann 551a7114fe feat(autocomplete): add style support, add forceInvalid input and invalid example 2026-06-02 16:33:26 +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 e5d5e2a5cc feat: replace *brn*Content w/ *hlm*Portal (#1180)
* feat(dialog): add hlmDialogPortal to expose *brnDialogContent

* feat(alert-dialog): add hlmAlertDialogPortal to expose *brnAlertDialogContent

* feat(popover): add hlmPopoverPortal to expose *brnPopoverContent

* feat(sheet): add hlmSheetPortal to expose *brnSheetContent

* feat(navigation-menu): add hlmNavigationMenuPortal to expose *brnNavigationMenuContent

* chore: add dialog portal healtcheck and migration

* chore: dogfood dialog portal migration

* chore: fix imports

* chore: use importAlias for popover helm import

* chore: remove importAlias in healthcheck

* feat(popover): update hlm-popover-content selector

* feat(sheet): add showCloseButton input and use hlmBtn for close button

* feat(navigation-menu): update HlmNavigationMenuContent selector

* feat(autocomplete): update HlmAutocompleteContent selector and add autocomplete portal

* chore: add no-scrollbar util to tailwind preset used by autocomplete/combobox/command

* feat(combobox): update HlmComboboxContent selector and use combobox portal

* chore: update snapshot

* fix: storybook imports

* fix(sheet): apply data-slot on button directly and fix test

* otherwise hlmBtn slot is used

* fix(popover): storybook template error
2026-02-04 11:38:58 +01:00
Marc Stammerjohann 2c9335e088 feat: add autoHighlight combobox autocomplete (#1171)
* feat(combobox): add autoHighlight option and examples

* docs(combobox): self closing for combobox-input

* feat(autocomplete): add autoHighlight option and examples
2026-01-30 15:58:04 +01:00
Marc Stammerjohann 88dd96865b feat: expose restoreFocus input from autocomplete and combobox (#1165)
* feat: expose restoreFocus input from autocomplete and combobox

* feat: add restoreFocus to autocomplete search and combobox multiple
2026-01-30 10:32:36 +01:00
Marc Stammerjohann 0c247d8d57 feat: autocomplete refactor - simplified template (#1148)
* feat(autocomplete): simplify autocomplete template

* feat(autocomplete): rename value accessor

* feat(autocomplete): add autocomplete-search component for free-form text

* docs(autocomplete): use field for form examples

* docs(autocomplete): add changeDetection onPush

* feat(autocomplete): add status and improve async example

* fix empty position in the example templates

* docs(autocomplete): fix lint issues and update snapshot
2026-01-22 09:30:03 +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
Marc Stammerjohann 67d5efc52d feat: replace components with directives (#1063)
* feat(autocomplete): use directive and use ClassValue type

* feat(carousel): use directives and add data-slot

* docs(carousel): simplify imports

* feat(command): use directive, use ClassValue type and add data-slot

* docs(command): use hlm-dialog, format usage code

* feat(hover-card): use directive and add data-slot

* feat(resizable): use directive and add data-slot

* docs(resizable): format code usage

* feat(radio-group): use directive

* feat(sidebar): use self-closing tag

* feat(tabs): use directives and add data-slot

* docs(tabs): simplify imports

* feat(tooltip): use directive and add data-slot

* feat(hover-card): use directive

* chore: update snapshot for selectors/inputs
2025-12-04 22:17:44 +01:00
Marc Stammerjohann 11d5b4390c chore: add types to inputs for the docs api (#1062) 2025-12-04 12:37:22 +01:00
Marc Stammerjohann 29192af454 feat: improve dialog, alert-dialog, sheet and popover (#1059)
* feat(dialog): change dialogs to directive

* docs(popover): add name to  popover template selector

* feat(dialog): simplify dialog overlay

* feat(dialog): use BrnDialogTitle as hostDirective, add data-slot

* feat(dialog): use hostDirectives, change components to directives

* add data-slot

* feat(alert-dialog): use directives, add data-slot

* feat(sheet): use directives, add data-slot

* feat(dialog): add hlm trigger directive

* feat(popover): remove unused popover-close

* feat(popover): add hlm-popover

* feat: update snapshot and selectors

* feat(dialog): add healthcheck and migration

* feat(popover): expose more inputs/outputs

* feat(dialog): dogfeeding healthcheck and migration

* feat(dialog): add types to inputs

* feat(popover): expose more inputs

* feat(dialog): use hlmDialogTrigger

* feat(dialog): remove unused importAlias

* feat(dialog): add input types
2025-12-04 10:20:12 +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
moosme af731d14e5 fix(input-group): icon sizes (#987)
* fix(input-group): icon sizes

* fix(input-group): icon sizes

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-11-04 16:54:24 +01:00
Marc Stammerjohann e3a0eaf944 feat: improve autocomplete form (#965)
* refactor(autocomplete): simplify  BrnAutocompleteSearchInput w/o search value control

* feat(autocomplete): debounce search input, fix form write opens options

* refactor(autocomplete): infer input type

* refactor(autocomplete): simplify selection cleared

* refactor(autocomplete): update imports

* feat(autocomplete): update snapshot

* feat(autocomplete): require select and form support

* feat(autocomplete): fix keyboard navigation and test

* feat(autocomplete): polish button type, value generic, and default values

* feat(autocomplete): compute displaySearchValue based on displayWith or transformValueToSearch

* use in write and option select

* feat(autocomplete): add generic for transformed value, add example

* docs(autocomplete): fix example type

* feat(autocomplete): update snapshot

* feat(autocomplete): remove displayWith from token as the context is not available there

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-10-29 10:39:38 +01:00
Merlin 64f82d8b79 feat(item): run format all 2025-10-22 15:40:07 +02:00
Marc Stammerjohann 0789cc8b0e feat: improve autocomplete aria and reflect form writes in search (#949)
* feat(autocomplete): update searchValue for form writes

* feat(autocomplete): open on ArrowUp and select last, #876

* move open/close into BrnAutocomplete

* feat(autocomplete): escape removes search when popover is closed, #876

* feat(autocomplete): update snapshot

* feat(autocomplete): change value to model in brn search input

* feat(autocomplete): update snapshot
2025-10-22 13:15:15 +02:00
moosme 0404376bbe feat: tailwind update and renew website style (#939)
* feat: polish the website and tailwind 4

* feat: fix context menu

* feat: add components page

* feat: add components page

* feat: add new label #924 and restyle

* feat: polish website and remove docsearch

* feat: add custom docsearch

* feat: storybook setup tailwind 4 (wip)

* feat: change css layer order

* feat: change title restructure code

* feat: finalize docs

* feat: storybook fix

* feat: fix missing links

* feat: fix tests

* feat: fix styling and wip links

* feat: fix spacing

* feat: add github stars

* feat: fix tests

* feat: align style

* fix: resolve comments

---------

Co-authored-by: Merlin <merlin.moos@oldendorff.com>
2025-10-22 08:40:51 +02:00
Marc Stammerjohann 3918aee2cd feat: autocomplete transform option to string (#913)
* feat(autocomplete): add transform optio to string to config, apply for option value

* docs(autocomplete): add config example and describe both functions

* feat(autocomplete): update classes and add additional input classes for autocomplete

* feat(autocomplete): add aria-expanded to BrnAutocompleteSearchInput
2025-10-09 10:01:39 +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 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