Commit Graph

30 Commits

Author SHA1 Message Date
Jan Zimola 6c69b40782 fix(tooltip): address review feedback on position change subscription
- Replace `take(1)` with a full subscription stored in `_positionChangeSub`
  so viewport resizes while the tooltip is open correctly update arrow
  direction. The subscription is cleaned up in `_hide()`.
- Remove the `resolved !== this.position()` guard so that returning to
  the preferred side after a flip correctly resets the arrow.
- Change `resolveTooltipPosition` to return `null` instead of silently
  defaulting to `'top'`, so the caller skips the update on unknown
  positions rather than rendering a potentially wrong arrow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 15:14:54 +02:00
Jan Zimola 7439dc6b13 feat(tooltip): add viewport-aware auto-flip positioning
BrnTooltip currently builds a CDK overlay position strategy with only a
single position and no fallbacks. When the trigger element is near a
viewport edge (e.g. a button in a top app bar with position="top"),
the tooltip overflows off-screen instead of flipping to the opposite
side.

This commit:
- Adds fallback positions so the CDK FlexibleConnectedPositionStrategy
  tries the opposite side (and then the remaining two sides) when the
  preferred position doesn't fit
- Adds withViewportMargin(8) to prevent tooltips from touching the
  viewport edge
- Subscribes to positionChanges to update BrnTooltipContent's position
  signal and arrow classes when the CDK resolves to a fallback position
- Exports BRN_TOOLTIP_FALLBACK_POSITIONS and resolveTooltipPosition
  for consumers who need custom position logic

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-13 14:48:02 +02:00
Merlin Moos 1dcd413cbe fix: format 2026-03-14 19:19:35 +01:00
oussema sahbeni 55ded8fc6a fix(tooltip): enhance position update logic for attached overlay 2026-03-14 15:08:45 +01:00
oussema sahbeni 2fde4bc11d fix(tooltip): update tooltip overlay direction handling 2026-03-14 14:50:08 +01:00
oussema sahbeni 6397fecf61 fix(tooltip): fix formatting issues 2026-03-08 16:04:57 +01:00
oussema sahbeni f0d7d994b9 fix(tooltip): enhance position adjustment for RTL support 2026-03-08 15:46:34 +01:00
Felix Hagemans d9ff1788ea fix(sidebar): use linkedSignal instead of computed() for disabling tooltip programatically 2026-02-24 13:08:35 +01:00
Felix Hagemans b28e0258de fix(sidebar): disable sidebar tooltips when open or on mobile 2026-02-23 17:53:13 +01:00
Merlin dbdda7a79a refactor(tooltip): add disabled state and examples 2026-02-02 13:38:32 +01:00
Merlin bfff0c3de1 refactor(tooltip): fix flickering 2026-02-02 11:21:56 +01:00
Merlin e32a47f48c refactor(tooltip): implement new tooltip 2026-02-02 09:52:57 +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 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
Toni Škobić 1801c9007f feat(navigation-menu): add navigation menu (#951)
* feat(navigation-menu): init brain

* feat(navigation-menu): init helm

* feat(navigation-menu): init inputs for root comp

* feat(navigation-menu): setup contexts and scaffolds comps WIP

* feat(cli): init trigger component

* feat(navigation-menu): init content comp and fix selectors

* feat(navigation-menu): create link comp and improve others

* feat(navigation-menu): create hlm directives WIP and export from index.ts

* feat(navigation-menu): start working on rendering content

* refactor(hover-card): move createHoverObservable to core

* feat(navigation-menu): init content service and rendering content WIP

* fix(hover-card): fix overlay position strategy position expression

* feat(navigation-menu): render content using angular cdk overlay WIP

* feat(navigation-menu): set delay duration on open

* feat(navigation-menu): show/hide content in all cases

* docs(navigation-menu): improve docs WIP

* feat(navigation-menu): move content related type to service class

* feat(navigation-menu): implement skip animation logic

* fix(navigation-menu): fix navigation mouse out behaviour

* docs(navigation-menu): add brain and helm api

* feat(navigation-menu): detach content on animation end

* refactor(navigation-menu): refactor setting data-motion logic

* docs(navigation-menu): add trigger chevron icon

* feat(navigation-menu): adjust content position

* docs(navigation-menu): add new badge

* feat(navigation-menu): support nested nav menu

* feat(navigation-menu): add missing orientation data attr

* feat(navigation-menu): add full support for dir and orientation

* fix(navigation-menu): apply dir to content overlay

* feat(navigation-menu): add support for tab and escape

* feat(navigation-menu): add hlm nav link

* feat(navigation-menu): close content on disabled item hover

* fix(navigation-menu): fix hover bug and rename variable

* fix(navigation-menu): add distinct hover

* fix(navigation-menu): fix animations and sub nav handling

* fix(navigation-menu): make button focusable in Safari, remove focused Observable

* feat(navigation-menu): implement keyboard focus

* feat(navigation-menu): comply with ARIA

* style: fix CSS popover and accent vars

* feat(navigation-menu): minor animation and render adjustments

* docs: write navigation menu docs WIP

* docs: remove redundant text

* docs: add navigation menu to storybook

* docs: modify nav menu example description

* docs: fix meta and title

* docs: remove accidentally added side nav content

* style: format

* fix(navigation-menu): fix token desc

* fix(tooltip): move computedPrevious to core

* fix(navigation-menu): expose isOpenDelayed as readonly

* fix(navigation-menu): rename hlmLink to hlmNavLink

* docs: update ui docs snapshot

* refactor: address lint issues

* chore: run format

* docs(navigation-menu): fix vertical menu width

* docs(navigation-menu): fix nested menu width

* fix(navigation-menu): resolve PR comments

* fix(navigation-menu): fix list styles

* fix(navigation-menu): add missing data-slot

* fix(navigation-menu): fix examples wrong href to docs

* feat(navigation-menu): add active input to link el
2025-10-28 21:09:38 +01: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
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
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
Matan Shushan c68bb7d989 fix(tooltip): allow programmatic control of tooltipContentClasses (#654) 2025-04-10 20:15:59 +02:00
Ashley Hunter 2a8c5d1eef feat: angular 19 (#612) 2025-03-17 22:58:33 +01:00
Benjamin Heiss cd119177b7 refactor: replace AllowSignalWrites with untracked (#607) 2025-02-20 18:27:59 +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
MerlinMoos 814062a81b refactor(tooltip): migrate to signals #430 (#503)
* refactor(tooltip): migrate to signals #430

* refactor(tooltip): change naming

* refactor(tooltip): change naming

* refactor(tooltip): remove alias

* refactor(tooltip): format

* refactor(hover-card): remove mutable state pattern. Create inject token

* refactor(tooltip): move computed previous to tooltip and remove ariaDescribedByState

* refactor(tooltip): add brackets to the signal call

* refactor(tooltip): run format

---------

Co-authored-by: moos <merlin.moos@oldendorff.com>
2025-01-07 06:30:39 +01:00
Ashley Hunter be4a87dc87 refactor: migrating remaining brain libraries to secondary entrypoints (#523)
* refactor: migrating remaining brain libraries to secondary entrypoints

* refactor: migrating remaining brain libraries to secondary entrypoints
2024-12-10 18:40:46 +01:00