ionbase-ui 0.18.1 → 0.19.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/dist/meta/Avatar.json +66 -0
- package/dist/meta/AvatarGroup.json +57 -0
- package/dist/meta/Badge.json +65 -0
- package/dist/meta/Checkbox.json +82 -0
- package/dist/meta/Divider.json +39 -0
- package/dist/meta/FullCard.json +77 -0
- package/dist/meta/Header.json +59 -0
- package/dist/meta/Icon.json +54 -0
- package/dist/meta/Link.json +67 -0
- package/dist/meta/Logo.json +49 -0
- package/dist/meta/LogoMark.json +38 -0
- package/dist/meta/Menu.json +54 -0
- package/dist/meta/MenuItem.json +51 -0
- package/dist/meta/NavItem.json +53 -0
- package/dist/meta/PhoneInput.json +60 -0
- package/dist/meta/Popover.json +92 -0
- package/dist/meta/Radio.json +77 -0
- package/dist/meta/RadioGroup.json +84 -0
- package/dist/meta/ScrollProgress.json +41 -0
- package/dist/meta/TabItem.json +42 -0
- package/dist/meta/TableBody.json +36 -0
- package/dist/meta/TableCell.json +83 -0
- package/dist/meta/TableHead.json +39 -0
- package/dist/meta/TableRow.json +45 -0
- package/dist/meta/Tabs.json +85 -0
- package/dist/meta/Toast.json +81 -0
- package/dist/meta/ToastProvider.json +57 -0
- package/dist/meta/Toggle.json +76 -0
- package/dist/meta/Tooltip.json +74 -0
- package/dist/meta/components.json +1859 -76
- package/dist/meta/index.json +88 -59
- package/package.json +1 -1
package/dist/meta/Tooltip.json
CHANGED
|
@@ -4,6 +4,80 @@
|
|
|
4
4
|
"propsType": "TooltipProps",
|
|
5
5
|
"description": "Tooltip — Figma `Tooltip` (801:1568).\n\nWraps its trigger rather than taking a ref, so the common case is one\nelement deep: `<Tooltip label=\"...\"><Button/></Tooltip>`.\n\nFOCUS OPENS IT, NOT JUST HOVER. A hover-only tooltip is invisible to keyboard\nand switch users, and `useTooltipTrigger` wires both plus Escape to dismiss.\nIt also enforces one open tooltip at a time and a shared warmup, so moving\nalong a row of icon buttons does not flash a tooltip per button.\n\nThe trigger is cloned with the interaction props and a ref, which means it\nmust forward both. Every component in this library does; a bare `<div>` does\ntoo. A function component that drops its ref will render, but the tooltip\nwill have nothing to position against.",
|
|
6
6
|
"import": "import { Tooltip } from 'ionbase-ui';",
|
|
7
|
+
"status": "stable",
|
|
8
|
+
"summary": "A text-only hint attached to a trigger. Opens on hover and on focus.",
|
|
9
|
+
"useWhen": [
|
|
10
|
+
"naming an icon-only control",
|
|
11
|
+
"adding a short clarification that is genuinely optional to read"
|
|
12
|
+
],
|
|
13
|
+
"useInstead": [
|
|
14
|
+
{
|
|
15
|
+
"when": "the content has anything focusable in it — a link, a button, a field",
|
|
16
|
+
"use": "Popover",
|
|
17
|
+
"why": "a tooltip cannot be focused, cannot be scrolled, and closes the moment the pointer leaves"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"when": "the information is required to complete the field",
|
|
21
|
+
"use": "Input",
|
|
22
|
+
"why": "Input's helper text is always visible; a tooltip is not discoverable on touch"
|
|
23
|
+
}
|
|
24
|
+
],
|
|
25
|
+
"variants": {
|
|
26
|
+
"placement": {
|
|
27
|
+
"top": {
|
|
28
|
+
"use": "above the trigger — the default reading position"
|
|
29
|
+
},
|
|
30
|
+
"bottom": {
|
|
31
|
+
"use": "below the trigger, for something near the top of the viewport"
|
|
32
|
+
},
|
|
33
|
+
"left": {
|
|
34
|
+
"use": "to the left of the trigger"
|
|
35
|
+
},
|
|
36
|
+
"right": {
|
|
37
|
+
"use": "to the right of the trigger"
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
"slots": {
|
|
42
|
+
"label": {
|
|
43
|
+
"accepts": "text",
|
|
44
|
+
"note": "the hint. Text only"
|
|
45
|
+
},
|
|
46
|
+
"title": {
|
|
47
|
+
"accepts": "text",
|
|
48
|
+
"note": "optional heading above the label"
|
|
49
|
+
},
|
|
50
|
+
"children": {
|
|
51
|
+
"accepts": "Button",
|
|
52
|
+
"note": "the trigger. Must forward both a ref and DOM props"
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
"a11y": {
|
|
56
|
+
"role": "tooltip",
|
|
57
|
+
"guarantees": [
|
|
58
|
+
"focus opens it, not only hover — a hover-only tooltip is invisible to keyboard and switch users",
|
|
59
|
+
"Escape dismisses it",
|
|
60
|
+
"one tooltip open at a time with a shared warmup, so moving along a row of icon buttons does not flash one per button",
|
|
61
|
+
"`placement` flips to the opposite side when there is no room"
|
|
62
|
+
],
|
|
63
|
+
"requires": [
|
|
64
|
+
"a trigger that is already labelled for icon-only controls — Tooltip supplies the hint, not the trigger's name"
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
"antiPatterns": [
|
|
68
|
+
{
|
|
69
|
+
"dont": "putting a link or button inside `label`",
|
|
70
|
+
"why": "it cannot be reached — the tooltip closes when the pointer leaves the trigger"
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
"dont": "a tooltip as the only place information appears",
|
|
74
|
+
"why": "it is undiscoverable on touch, where there is no hover"
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
"dont": "a tooltip on a disabled Button",
|
|
78
|
+
"why": "a disabled button takes no focus and often no pointer events, so the hint never appears for a keyboard user"
|
|
79
|
+
}
|
|
80
|
+
],
|
|
7
81
|
"stylesheet": "src/styles/tooltip.css",
|
|
8
82
|
"tokens": [
|
|
9
83
|
"--font-family-sans",
|