gitbutler/packages/ui
Esteban Vega d1462f1ea5
UI: Info Button component (#4829)
* UI: Info Button component

Info button that displays a custom component on hover.

* Extend tooltip

Optionally, toggle the tooltip on click.
If enabled, clicking outside will close the tooltip

* Click outside: Broaden the elements that can be ignored

Broaden the types of elements that can be ignored

* Info Button: Ignore the SVG when checking for clicking outside

* Info Button: Add Storybook

* Info Button: Use a separate component for the tooltip arrow

That way we can set the border-radius easliy, plus it's probably a bit more CSS-compatible with picky browser engines

* TooltipWrapper shared component

Factor out the common logic of the Tooltip and Info Button so that there is no duplicated functionality and so that the Info Button doesn't have to depend on the Tooltip

* Tooltip and the InfoButton use the TooltipWrapper

Use the shared component.
Also:
- Info button is opened (and stays open) on hover

* separate tooltip components

* icon transition effect added

* button tooltip to the body level + utils function

* Remove log

---------

Co-authored-by: Pavel Laptev <pawellaptew@gmail.com>
2024-09-07 22:12:52 +02:00
..
.storybook Fix the worst conflicts I've ever delt with 2024-08-05 14:01:49 +02:00
src UI: Info Button component (#4829) 2024-09-07 22:12:52 +02:00
static fix: mv ui package to packages/ 2024-06-26 18:03:55 +02:00
package.json Tooltip-refactoring-+-new-component (#4804) 2024-09-01 20:30:36 +02:00
postcss.config.js fix(ui): update ui output (#4649) 2024-08-08 14:51:37 +02:00
svelte.config.js fix: bump all svelte related dependencies (#4828) 2024-09-06 12:25:41 +02:00
terrazzo.config.js Tooltip-refactoring-+-new-component (#4804) 2024-09-01 20:30:36 +02:00
tsconfig.json fix(ui): update ui output (#4649) 2024-08-08 14:51:37 +02:00
vite.config.ts fix: bump all svelte related dependencies (#4828) 2024-09-06 12:25:41 +02:00