@justeattakeaway/pie-tooltip 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -33
- package/custom-elements.json +136 -6
- package/dist/index.d.ts +27 -56
- package/dist/index.js +352 -240
- package/dist/react.d.ts +27 -56
- package/dist/react.js +1 -1
- package/package.json +4 -4
- package/src/defs.ts +14 -54
- package/src/index.ts +338 -95
- package/src/react.ts +1 -1
- package/src/tooltip.scss +8 -1
package/src/react.ts
CHANGED
|
@@ -12,7 +12,7 @@ const PieTooltipReact = createComponent({
|
|
|
12
12
|
tagName: 'pie-tooltip',
|
|
13
13
|
events: {
|
|
14
14
|
onPieTooltipOpen: 'pie-tooltip-open' as EventName<Event>, // When a configured trigger asks for the panel. Set `isOpen` to `true` in response.
|
|
15
|
-
onPieTooltipClose: 'pie-tooltip-close' as EventName<Event>, // When the close button is clicked, or a configured trigger asks to dismiss the panel. Set `isOpen` to `false` in response.
|
|
15
|
+
onPieTooltipClose: 'pie-tooltip-close' as EventName<Event>, // When the close button is clicked, Escape is pressed, or a configured trigger asks to dismiss the panel. Set `isOpen` to `false` in response.
|
|
16
16
|
},
|
|
17
17
|
});
|
|
18
18
|
|
package/src/tooltip.scss
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
@use '@justeattakeaway/pie-css/scss' as p;
|
|
2
2
|
|
|
3
|
-
// All twelve position values are generated explicitly
|
|
3
|
+
// All twelve position values are generated explicitly, none inferred.
|
|
4
4
|
$tooltip-alignments: ('', '-start', '-end');
|
|
5
5
|
|
|
6
6
|
// Zero-size, pinned to the containing block's origin. Trigger position is measured relative
|
|
@@ -343,6 +343,13 @@ $tooltip-alignments: ('', '-start', '-end');
|
|
|
343
343
|
overflow-wrap: break-word;
|
|
344
344
|
}
|
|
345
345
|
|
|
346
|
+
// The content is the programmatic focus target in dialog mode (see `focusPanel`). It is never
|
|
347
|
+
// reached by Tab, which moves between the panel's own controls, so it draws no focus ring of
|
|
348
|
+
// its own: the controls inside the panel carry their own focus indicators.
|
|
349
|
+
.c-tooltip-content:focus {
|
|
350
|
+
outline: none;
|
|
351
|
+
}
|
|
352
|
+
|
|
346
353
|
.c-tooltip.has-action .c-tooltip-action {
|
|
347
354
|
display: flex;
|
|
348
355
|
justify-content: flex-end;
|