@astryxdesign/core 0.7.7-canary.f9ac85f → 0.7.7
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/CHANGELOG.md +104 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts +13 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.d.ts.map +1 -0
- package/dist/AppShell/useCloseMobileDrawerOnActivate.js +45 -0
- package/dist/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheet.js +79 -9
- package/dist/BottomSheet/BottomSheetPanel.d.ts.map +1 -1
- package/dist/BottomSheet/BottomSheetPanel.js +1 -1
- package/dist/BottomSheet/bottomSheetStack.d.ts.map +1 -1
- package/dist/BottomSheet/bottomSheetStack.js +5 -4
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts +2 -1
- package/dist/Breadcrumbs/BreadcrumbItem.d.ts.map +1 -1
- package/dist/Breadcrumbs/BreadcrumbItem.js +7 -3
- package/dist/Button/Button.d.ts.map +1 -1
- package/dist/Button/Button.js +30 -2
- package/dist/CheckboxList/CheckboxList.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxList.js +7 -1
- package/dist/CheckboxList/CheckboxListContext.d.ts +6 -0
- package/dist/CheckboxList/CheckboxListContext.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.d.ts.map +1 -1
- package/dist/CheckboxList/CheckboxListItem.js +10 -2
- package/dist/DateInput/DateInput.d.ts.map +1 -1
- package/dist/DateInput/DateInput.js +5 -2
- package/dist/DateInput/MonthScroller.d.ts.map +1 -1
- package/dist/DateInput/MonthScroller.js +13 -27
- package/dist/DateInput/Wheel.d.ts.map +1 -1
- package/dist/DateInput/Wheel.js +22 -41
- package/dist/DateTimeInput/DateTimeInput.d.ts.map +1 -1
- package/dist/DateTimeInput/DateTimeInput.js +5 -2
- package/dist/Dialog/Dialog.d.ts.map +1 -1
- package/dist/Dialog/Dialog.js +4 -3
- package/dist/Drawer/Drawer.js +0 -1
- package/dist/Drawer/useDrawerDialogPresence.d.ts.map +1 -1
- package/dist/Drawer/useDrawerDialogPresence.js +5 -1
- package/dist/Field/PanelSearchInput.d.ts +9 -1
- package/dist/Field/PanelSearchInput.d.ts.map +1 -1
- package/dist/Field/PanelSearchInput.js +3 -1
- package/dist/InfoTip/InfoTip.d.ts +2 -2
- package/dist/InfoTip/InfoTip.js +4 -4
- package/dist/Layer/layerAnimations.stylex.d.ts +7 -8
- package/dist/Layer/layerAnimations.stylex.d.ts.map +1 -1
- package/dist/Layer/layerAnimations.stylex.js +25 -20
- package/dist/Layer/usePressPin.d.ts +3 -5
- package/dist/Layer/usePressPin.d.ts.map +1 -1
- package/dist/Layer/usePressPin.js +4 -6
- package/dist/MobileNav/MobileNav.js +0 -1
- package/dist/MultiSelector/hooks.d.ts.map +1 -1
- package/dist/MultiSelector/hooks.js +2 -4
- package/dist/Outline/Outline.d.ts +2 -4
- package/dist/Outline/Outline.d.ts.map +1 -1
- package/dist/Outline/Outline.js +4 -52
- package/dist/Outline/useOutlineFromMarkdown.d.ts.map +1 -1
- package/dist/Outline/useOutlineFromMarkdown.js +1 -0
- package/dist/Outline/useScrollSpy.js +3 -3
- package/dist/PowerSearch/PowerSearch.d.ts.map +1 -1
- package/dist/PowerSearch/PowerSearch.js +134 -179
- package/dist/RadioList/RadioList.d.ts.map +1 -1
- package/dist/RadioList/RadioList.js +5 -0
- package/dist/Resizable/ResizeHandle.d.ts.map +1 -1
- package/dist/Resizable/ResizeHandle.js +118 -260
- package/dist/Resizable/resizeGesture.d.ts +91 -0
- package/dist/Resizable/resizeGesture.d.ts.map +1 -0
- package/dist/Resizable/resizeGesture.js +251 -0
- package/dist/SideNav/SideNavItem.d.ts.map +1 -1
- package/dist/SideNav/SideNavItem.js +3 -9
- package/dist/Token/Token.d.ts +2 -2
- package/dist/Token/Token.d.ts.map +1 -1
- package/dist/Token/Token.js +12 -4
- package/dist/Token/TokenNamingContext.d.ts +14 -0
- package/dist/Token/TokenNamingContext.d.ts.map +1 -0
- package/dist/Token/TokenNamingContext.js +23 -0
- package/dist/Tokenizer/Tokenizer.d.ts +46 -59
- package/dist/Tokenizer/Tokenizer.d.ts.map +1 -1
- package/dist/Tokenizer/Tokenizer.js +35 -58
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts +25 -28
- package/dist/Tokenizer/TokenizerBottomSheet.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerBottomSheet.js +157 -54
- package/dist/Tokenizer/TokenizerItemRemovableContext.d.ts.map +1 -1
- package/dist/Tokenizer/TokenizerItemRemovableContext.js +5 -3
- package/dist/Tooltip/Tooltip.d.ts +25 -30
- package/dist/Tooltip/Tooltip.d.ts.map +1 -1
- package/dist/Tooltip/Tooltip.js +24 -5
- package/dist/Tooltip/index.d.ts +1 -1
- package/dist/Tooltip/index.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.d.ts +28 -29
- package/dist/Tooltip/useTooltip.d.ts.map +1 -1
- package/dist/Tooltip/useTooltip.js +20 -8
- package/dist/TopNav/TopNavItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavItem.js +4 -7
- package/dist/TopNav/TopNavMegaMenuItem.d.ts.map +1 -1
- package/dist/TopNav/TopNavMegaMenuItem.js +4 -7
- package/dist/TopNav/TopNavMenu.d.ts.map +1 -1
- package/dist/TopNav/TopNavMenu.js +4 -7
- package/dist/astryx.css +5 -5
- package/dist/gestures/GestureHost.d.ts +27 -1
- package/dist/gestures/GestureHost.d.ts.map +1 -1
- package/dist/gestures/GestureHost.js +90 -8
- package/dist/hooks/useHighlightedOptionScroll.d.ts +11 -1
- package/dist/hooks/useHighlightedOptionScroll.d.ts.map +1 -1
- package/dist/hooks/useHighlightedOptionScroll.js +103 -5
- package/dist/hooks/useMenuPress.d.ts.map +1 -1
- package/dist/hooks/useMenuPress.js +4 -2
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/PowerSearch/PowerSearch.generated.js +1 -0
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.d.ts.map +1 -1
- package/dist/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.js +7 -1
- package/dist/i18n/generated-locales/en.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/en.generated.js +1 -0
- package/dist/i18n/generated-locales/pseudo.generated.d.ts.map +1 -1
- package/dist/i18n/generated-locales/pseudo.generated.js +1 -0
- package/dist/internal/SheetConfirmation.d.ts +11 -0
- package/dist/internal/SheetConfirmation.d.ts.map +1 -0
- package/dist/internal/SheetConfirmation.js +92 -0
- package/dist/internal/sheetDraft.d.ts +35 -0
- package/dist/internal/sheetDraft.d.ts.map +1 -0
- package/dist/internal/sheetDraft.js +65 -0
- package/dist/internal/touch-sheet.d.ts +21 -0
- package/dist/internal/touch-sheet.d.ts.map +1 -0
- package/dist/internal/touch-sheet.js +19 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts +24 -0
- package/dist/internal/useDismissSearchOnTouchDrag.d.ts.map +1 -0
- package/dist/internal/useDismissSearchOnTouchDrag.js +56 -0
- package/dist/motion/reducedMotion.d.ts +24 -0
- package/dist/motion/reducedMotion.d.ts.map +1 -1
- package/dist/motion/reducedMotion.js +78 -1
- package/dist/utils/clickGuard.d.ts +8 -1
- package/dist/utils/clickGuard.d.ts.map +1 -1
- package/dist/utils/clickGuard.js +24 -1
- package/locales/en.json +4 -0
- package/locales/pseudo.json +3 -0
- package/package.json +9 -9
- package/src/AppShell/useCloseMobileDrawerOnActivate.ts +52 -0
- package/src/BottomSheet/BottomSheet.tsx +95 -10
- package/src/BottomSheet/BottomSheetPanel.tsx +7 -2
- package/src/BottomSheet/bottomSheetStack.ts +8 -4
- package/src/Breadcrumbs/BreadcrumbItem.tsx +13 -3
- package/src/Button/Button.tsx +37 -1
- package/src/CheckboxList/CheckboxList.doc.mjs +4 -2
- package/src/CheckboxList/CheckboxList.tsx +6 -0
- package/src/CheckboxList/CheckboxListContext.tsx +6 -0
- package/src/CheckboxList/CheckboxListItem.tsx +11 -2
- package/src/DateInput/DateInput.tsx +8 -2
- package/src/DateInput/MonthScroller.tsx +18 -22
- package/src/DateInput/Wheel.tsx +30 -32
- package/src/DateTimeInput/DateTimeInput.tsx +8 -2
- package/src/Dialog/Dialog.tsx +19 -4
- package/src/Drawer/Drawer.tsx +1 -1
- package/src/Drawer/useDrawerDialogPresence.ts +5 -1
- package/src/Field/PanelSearchInput.tsx +11 -0
- package/src/InfoTip/InfoTip.doc.mjs +3 -3
- package/src/InfoTip/InfoTip.tsx +5 -5
- package/src/Layer/layerAnimations.stylex.ts +24 -16
- package/src/Layer/usePressPin.ts +5 -11
- package/src/MobileNav/MobileNav.tsx +1 -1
- package/src/MultiSelector/hooks.ts +2 -4
- package/src/Outline/Outline.doc.mjs +177 -51
- package/src/Outline/Outline.tsx +5 -57
- package/src/Outline/useOutlineFromMarkdown.doc.mjs +157 -0
- package/src/Outline/useOutlineFromMarkdown.ts +1 -0
- package/src/Outline/useScrollSpy.ts +3 -3
- package/src/PowerSearch/PowerSearch.doc.mjs +3 -3
- package/src/PowerSearch/PowerSearch.tsx +196 -183
- package/src/RadioList/RadioList.doc.mjs +4 -2
- package/src/RadioList/RadioList.tsx +4 -0
- package/src/Resizable/ResizeHandle.tsx +133 -328
- package/src/Resizable/resizeGesture.ts +368 -0
- package/src/SideNav/SideNavItem.tsx +3 -7
- package/src/Token/Token.tsx +13 -4
- package/src/Token/TokenNamingContext.ts +28 -0
- package/src/Tokenizer/Tokenizer.doc.mjs +16 -0
- package/src/Tokenizer/Tokenizer.tsx +81 -86
- package/src/Tokenizer/TokenizerBottomSheet.tsx +219 -93
- package/src/Tokenizer/TokenizerItemRemovableContext.ts +5 -3
- package/src/Tooltip/Tooltip.doc.mjs +123 -54
- package/src/Tooltip/Tooltip.tsx +36 -39
- package/src/Tooltip/index.ts +0 -1
- package/src/Tooltip/useTooltip.doc.mjs +147 -33
- package/src/Tooltip/useTooltip.tsx +39 -32
- package/src/TopNav/TopNavItem.tsx +6 -5
- package/src/TopNav/TopNavMegaMenuItem.tsx +6 -5
- package/src/TopNav/TopNavMenu.tsx +6 -5
- package/src/gestures/GestureHost.ts +105 -10
- package/src/hooks/useHighlightedOptionScroll.ts +113 -9
- package/src/hooks/useMenuPress.ts +8 -2
- package/src/i18n/generated-english/PowerSearch/PowerSearch.generated.ts +1 -0
- package/src/i18n/generated-english/Tokenizer/TokenizerBottomSheet.generated.ts +7 -1
- package/src/i18n/generated-locales/en.generated.ts +1 -0
- package/src/i18n/generated-locales/pseudo.generated.ts +1 -0
- package/src/internal/SheetConfirmation.tsx +101 -0
- package/src/internal/sheetDraft.ts +80 -0
- package/src/internal/touch-sheet.ts +21 -0
- package/src/internal/useDismissSearchOnTouchDrag.ts +69 -0
- package/src/motion/reducedMotion.ts +79 -1
- package/src/utils/clickGuard.ts +37 -1
- package/dist/internal/tokenizer-presentation.d.ts +0 -21
- package/dist/internal/tokenizer-presentation.d.ts.map +0 -1
- package/dist/internal/tokenizer-presentation.js +0 -21
- package/src/internal/tokenizer-presentation.ts +0 -25
|
@@ -24,16 +24,29 @@ export const docs = {
|
|
|
24
24
|
playground: {
|
|
25
25
|
defaults: {
|
|
26
26
|
content: 'Helpful tooltip text',
|
|
27
|
-
children: {
|
|
27
|
+
children: {
|
|
28
|
+
__element: 'Button',
|
|
29
|
+
props: {label: 'Hover me', variant: 'secondary'},
|
|
30
|
+
},
|
|
28
31
|
},
|
|
29
32
|
},
|
|
30
|
-
keywords: [
|
|
33
|
+
keywords: [
|
|
34
|
+
'tooltip',
|
|
35
|
+
'hint',
|
|
36
|
+
'infotip',
|
|
37
|
+
'title',
|
|
38
|
+
'hover',
|
|
39
|
+
'flyout',
|
|
40
|
+
'balloon',
|
|
41
|
+
'helpertext',
|
|
42
|
+
],
|
|
31
43
|
components: [
|
|
32
44
|
{
|
|
33
45
|
name: 'Tooltip',
|
|
34
46
|
displayName: 'Tooltip',
|
|
35
47
|
description:
|
|
36
|
-
'Component wrapper for tooltip display triggered on hover or focus.',
|
|
48
|
+
'Component wrapper for tooltip display triggered on hover or focus.',
|
|
49
|
+
props: [
|
|
37
50
|
{
|
|
38
51
|
name: 'children',
|
|
39
52
|
type: 'ReactNode',
|
|
@@ -48,18 +61,26 @@ export const docs = {
|
|
|
48
61
|
name: 'content',
|
|
49
62
|
type: 'ReactNode',
|
|
50
63
|
description: 'Tooltip content, typically short text.',
|
|
51
|
-
slotElements: [
|
|
64
|
+
slotElements: [
|
|
65
|
+
{
|
|
66
|
+
__element: 'Text',
|
|
67
|
+
props: {type: 'body'},
|
|
68
|
+
children: 'Content text',
|
|
69
|
+
},
|
|
70
|
+
],
|
|
52
71
|
},
|
|
53
72
|
{
|
|
54
73
|
name: 'placement',
|
|
55
74
|
type: "'above' | 'below' | 'start' | 'end'",
|
|
56
|
-
description:
|
|
75
|
+
description:
|
|
76
|
+
"Position relative to the anchor element. Logical: start/end resolve against the popover\'s own inherited direction (RTL mirrors in pure CSS).",
|
|
57
77
|
default: "'above'",
|
|
58
78
|
},
|
|
59
79
|
{
|
|
60
80
|
name: 'alignment',
|
|
61
81
|
type: "'start' | 'center' | 'end'",
|
|
62
|
-
description:
|
|
82
|
+
description:
|
|
83
|
+
"Alignment along the placement axis. Logical: start/end resolve against the popover\'s own inherited direction (RTL mirrors in pure CSS).",
|
|
63
84
|
default: "'center'",
|
|
64
85
|
},
|
|
65
86
|
{
|
|
@@ -84,16 +105,9 @@ export const docs = {
|
|
|
84
105
|
name: 'touchTrigger',
|
|
85
106
|
type: "'auto' | 'tap' | 'none'",
|
|
86
107
|
description:
|
|
87
|
-
'What a tap does where there is no hover. auto opens on tap unless the trigger performs an action of its own (a button, link, or form control), whose tap belongs to the control; an aria-disabled control performs none, so a tap on it opens its reason. tap always opens
|
|
108
|
+
'What a tap does where there is no hover. auto opens on tap unless the trigger performs an action of its own (a button, link, or form control), whose tap belongs to the control; an aria-disabled control performs none, so a tap on it opens its reason. tap always opens, for a button whose only job is to reveal the tooltip; for an info icon, use InfoTip. none never opens on touch.',
|
|
88
109
|
default: "'auto'",
|
|
89
110
|
},
|
|
90
|
-
{
|
|
91
|
-
name: 'triggerBehavior',
|
|
92
|
-
type: "'adaptive' | 'hover' | 'toggle'",
|
|
93
|
-
description:
|
|
94
|
-
'How the trigger opens the tooltip. adaptive (the default): hover and focus preview it, and a tap opens it unless the trigger performs an action of its own, as touchTrigger decides while it remains. hover: hover and focus preview it, and no touch or pen tap opens it. toggle, on a button trigger: a click, a tap, Enter, or Space pins the tooltip and the same press closes it, while hover and keyboard focus still preview it. A pinned tooltip stays until Escape, a second press, a press outside, or focus leaving, and the press stops at the trigger, so a clickable row or card around it does not activate (with anchorRef, the anchored trigger still runs its own onClick, Astryx clickable rows and cards ignore the press except an Item row when the anchor is not a native button, and a plain onClick element around the anchor receives it unless that onClick stops it). The trigger reports aria-expanded and aria-controls, and the text is announced once when it pins. Use it for an info icon or any button whose only job is revealing the tooltip.',
|
|
95
|
-
default: "'adaptive'",
|
|
96
|
-
},
|
|
97
111
|
{
|
|
98
112
|
name: 'isEnabled',
|
|
99
113
|
type: 'boolean',
|
|
@@ -115,7 +129,8 @@ export const docs = {
|
|
|
115
129
|
{
|
|
116
130
|
name: 'isDefaultOpen',
|
|
117
131
|
type: 'boolean',
|
|
118
|
-
description:
|
|
132
|
+
description:
|
|
133
|
+
'Whether the tooltip should be shown on mount. Still dismissible.',
|
|
119
134
|
},
|
|
120
135
|
{
|
|
121
136
|
name: 'isOpen',
|
|
@@ -126,20 +141,38 @@ export const docs = {
|
|
|
126
141
|
},
|
|
127
142
|
],
|
|
128
143
|
theming: {
|
|
129
|
-
targets: [
|
|
130
|
-
{className: 'astryx-tooltip'},
|
|
131
|
-
],
|
|
144
|
+
targets: [{className: 'astryx-tooltip'}],
|
|
132
145
|
},
|
|
133
146
|
usage: {
|
|
134
147
|
anatomy,
|
|
135
148
|
description:
|
|
136
149
|
'A short text hint that appears on hover or focus, anchored to a trigger element. Use it to describe icon-only buttons, show the full text of truncated labels, or provide supplementary context without cluttering the UI.',
|
|
137
150
|
bestPractices: [
|
|
138
|
-
{
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
151
|
+
{
|
|
152
|
+
guidance: true,
|
|
153
|
+
description:
|
|
154
|
+
'Keep tooltip content concise: aim for under 140 characters of plain text.',
|
|
155
|
+
},
|
|
156
|
+
{
|
|
157
|
+
guidance: true,
|
|
158
|
+
description:
|
|
159
|
+
'Add a tooltip to icon-only buttons and controls that lack a visible label.',
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
guidance: true,
|
|
163
|
+
description:
|
|
164
|
+
'Set touchTrigger to tap when the trigger is a button whose only job is revealing the tooltip: touch has no hover, and auto keeps the tap for triggers that perform an action. For an info icon, use InfoTip, which also pins its help on a press.',
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
guidance: false,
|
|
168
|
+
description:
|
|
169
|
+
'Place interactive elements like links or buttons inside a tooltip; use HoverCard or Popover instead.',
|
|
170
|
+
},
|
|
171
|
+
{
|
|
172
|
+
guidance: false,
|
|
173
|
+
description:
|
|
174
|
+
'Use tooltips for essential information that users must see to complete a task.',
|
|
175
|
+
},
|
|
143
176
|
],
|
|
144
177
|
},
|
|
145
178
|
};
|
|
@@ -152,8 +185,7 @@ export const docsZh = {
|
|
|
152
185
|
{
|
|
153
186
|
name: 'Tooltip',
|
|
154
187
|
displayName: 'Tooltip',
|
|
155
|
-
description:
|
|
156
|
-
'工具提示显示的组件包装器,通过悬停或聚焦触发。',
|
|
188
|
+
description: '工具提示显示的组件包装器,通过悬停或聚焦触发。',
|
|
157
189
|
props: [
|
|
158
190
|
{
|
|
159
191
|
name: 'children',
|
|
@@ -173,13 +205,15 @@ export const docsZh = {
|
|
|
173
205
|
{
|
|
174
206
|
name: 'placement',
|
|
175
207
|
type: "'above' | 'below' | 'start' | 'end'",
|
|
176
|
-
description:
|
|
208
|
+
description:
|
|
209
|
+
'相对于锚点元素的位置。逻辑值:start/end 根据弹出层自身继承的方向解析(RTL 镜像)。',
|
|
177
210
|
default: "'above'",
|
|
178
211
|
},
|
|
179
212
|
{
|
|
180
213
|
name: 'alignment',
|
|
181
214
|
type: "'start' | 'center' | 'end'",
|
|
182
|
-
description:
|
|
215
|
+
description:
|
|
216
|
+
'沿放置轴的对齐方式。逻辑值:start/end 根据弹出层自身继承的方向解析(RTL 镜像)。',
|
|
183
217
|
default: "'center'",
|
|
184
218
|
},
|
|
185
219
|
{
|
|
@@ -204,16 +238,9 @@ export const docsZh = {
|
|
|
204
238
|
name: 'touchTrigger',
|
|
205
239
|
type: "'auto' | 'tap' | 'none'",
|
|
206
240
|
description:
|
|
207
|
-
'在没有悬停的触摸设备上,轻点的行为。auto:轻点即打开,除非触发元素本身会执行操作(按钮、链接、表单控件),此时轻点归该控件所有;设置了 aria-disabled 的控件不执行操作,因此轻点它会显示其原因。tap
|
|
241
|
+
'在没有悬停的触摸设备上,轻点的行为。auto:轻点即打开,除非触发元素本身会执行操作(按钮、链接、表单控件),此时轻点归该控件所有;设置了 aria-disabled 的控件不执行操作,因此轻点它会显示其原因。tap:始终轻点打开,适用于唯一作用是显示工具提示的按钮;信息图标请使用 InfoTip。none:触摸永不打开。',
|
|
208
242
|
default: "'auto'",
|
|
209
243
|
},
|
|
210
|
-
{
|
|
211
|
-
name: 'triggerBehavior',
|
|
212
|
-
type: "'adaptive' | 'hover' | 'toggle'",
|
|
213
|
-
description:
|
|
214
|
-
'触发元素如何打开工具提示。adaptive(默认):悬停和聚焦会预览;轻点即打开,除非触发元素本身会执行操作(在 touchTrigger 仍存在期间由它决定)。hover:悬停和聚焦会预览,触摸或触控笔轻点都不会打开。toggle(仅限按钮触发元素):单击、轻点、Enter 或空格键固定打开,再按一次关闭;悬停和键盘聚焦仍会预览。固定后,直到按 Escape、再次按下、在外部按下或焦点移出才关闭;这次按下止于触发元素,外层可点击的行或卡片不会被激活(使用 anchorRef 时,锚定元素自身的 onClick 仍会运行,Astryx 的可点击行和卡片会忽略这次按下,但锚定元素不是原生按钮时,Item 行仍会响应,锚定元素外层普通的 onClick 元素仍会收到,除非锚定元素的 onClick 阻止它)。触发元素会报告 aria-expanded 和 aria-controls,固定时朗读一次文本。适用于信息图标等唯一作用就是显示工具提示的按钮。',
|
|
215
|
-
default: "'adaptive'",
|
|
216
|
-
},
|
|
217
244
|
{
|
|
218
245
|
name: 'isEnabled',
|
|
219
246
|
type: 'boolean',
|
|
@@ -241,37 +268,76 @@ export const docsZh = {
|
|
|
241
268
|
},
|
|
242
269
|
],
|
|
243
270
|
theming: {
|
|
244
|
-
targets: [
|
|
245
|
-
{className: 'astryx-tooltip'},
|
|
246
|
-
],
|
|
271
|
+
targets: [{className: 'astryx-tooltip'}],
|
|
247
272
|
},
|
|
248
273
|
usage: {
|
|
249
274
|
anatomy,
|
|
250
275
|
description:
|
|
251
276
|
'A short text hint that appears on hover or focus, anchored to a trigger element. Use it to describe icon-only buttons, show the full text of truncated labels, or provide supplementary context without cluttering the UI.',
|
|
252
277
|
bestPractices: [
|
|
253
|
-
{
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
278
|
+
{
|
|
279
|
+
guidance: true,
|
|
280
|
+
description:
|
|
281
|
+
'Keep tooltip content concise: aim for under 140 characters of plain text.',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
guidance: true,
|
|
285
|
+
description:
|
|
286
|
+
'Add a tooltip to icon-only buttons and controls that lack a visible label.',
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
guidance: true,
|
|
290
|
+
description:
|
|
291
|
+
'Set touchTrigger to tap when the trigger is a button whose only job is revealing the tooltip: touch has no hover, and auto keeps the tap for triggers that perform an action. For an info icon, use InfoTip, which also pins its help on a press.',
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
guidance: false,
|
|
295
|
+
description:
|
|
296
|
+
'Place interactive elements like links or buttons inside a tooltip; use HoverCard or Popover instead.',
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
guidance: false,
|
|
300
|
+
description:
|
|
301
|
+
'Use tooltips for essential information that users must see to complete a task.',
|
|
302
|
+
},
|
|
258
303
|
],
|
|
259
304
|
},
|
|
260
305
|
};
|
|
261
306
|
|
|
262
307
|
/** @type {import('@astryxdesign/cli/authoring').ComponentTranslationDoc} */
|
|
263
308
|
export const docsDense = {
|
|
264
|
-
description:
|
|
309
|
+
description:
|
|
310
|
+
'Hover/focus triggered tooltip for displaying short, non-interactive text anchored to trigger element.',
|
|
265
311
|
usage: {
|
|
266
312
|
anatomy,
|
|
267
313
|
description:
|
|
268
314
|
'A short text hint that appears on hover or focus, anchored to a trigger element. Use it to describe icon-only buttons, show the full text of truncated labels, or provide supplementary context without cluttering the UI.',
|
|
269
315
|
bestPractices: [
|
|
270
|
-
{
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
316
|
+
{
|
|
317
|
+
guidance: true,
|
|
318
|
+
description:
|
|
319
|
+
'Keep tooltip content concise: aim for under 140 characters of plain text.',
|
|
320
|
+
},
|
|
321
|
+
{
|
|
322
|
+
guidance: true,
|
|
323
|
+
description:
|
|
324
|
+
'Add a tooltip to icon-only buttons and controls that lack a visible label.',
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
guidance: true,
|
|
328
|
+
description:
|
|
329
|
+
'Set touchTrigger to tap when the trigger is a button whose only job is revealing the tooltip: touch has no hover, and auto keeps the tap for triggers that perform an action. For an info icon, use InfoTip, which also pins its help on a press.',
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
guidance: false,
|
|
333
|
+
description:
|
|
334
|
+
'Place interactive elements like links or buttons inside a tooltip; use HoverCard or Popover instead.',
|
|
335
|
+
},
|
|
336
|
+
{
|
|
337
|
+
guidance: false,
|
|
338
|
+
description:
|
|
339
|
+
'Use tooltips for essential information that users must see to complete a task.',
|
|
340
|
+
},
|
|
275
341
|
],
|
|
276
342
|
},
|
|
277
343
|
components: [
|
|
@@ -283,15 +349,18 @@ export const docsDense = {
|
|
|
283
349
|
children: 'Trigger element(s) that activate tooltip.',
|
|
284
350
|
anchorRef: 'External anchor ref for sibling mode.',
|
|
285
351
|
content: 'Tooltip content, typically short text.',
|
|
286
|
-
placement:
|
|
287
|
-
|
|
352
|
+
placement:
|
|
353
|
+
"Position relative to anchor. Logical: start/end follow the popover's inherited direction (RTL mirrors).",
|
|
354
|
+
alignment:
|
|
355
|
+
"Alignment along placement axis. Logical: start/end follow the popover's inherited direction (RTL mirrors).",
|
|
288
356
|
delay: 'Show delay in ms.',
|
|
289
357
|
hideDelay: 'Hide delay in ms.',
|
|
290
358
|
focusTrigger: 'Controls when focus events trigger tooltip.',
|
|
291
|
-
touchTrigger:
|
|
292
|
-
|
|
359
|
+
touchTrigger:
|
|
360
|
+
'Tap behavior where there is no hover. auto = tap opens unless the trigger acts (button/link/control; an aria-disabled control does not act); tap = always opens (a button whose only job is the tooltip; for an info icon use InfoTip); none = never on touch.',
|
|
293
361
|
isEnabled: 'Enables/disables tooltip triggers.',
|
|
294
|
-
onOpenChange:
|
|
362
|
+
onOpenChange:
|
|
363
|
+
'Callback when visibility changes; true=shown, false=hidden.',
|
|
295
364
|
hasHoverIndication: 'Dashed underline on trigger element.',
|
|
296
365
|
isDefaultOpen: 'Show tooltip on mount. Still dismissible.',
|
|
297
366
|
},
|
package/src/Tooltip/Tooltip.tsx
CHANGED
|
@@ -5,7 +5,8 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* @file Tooltip.tsx
|
|
7
7
|
* @input Uses React, useTooltip hook
|
|
8
|
-
* @output Exports Tooltip component for hover/focus triggered tooltips
|
|
8
|
+
* @output Exports Tooltip component for hover/focus triggered tooltips, and the
|
|
9
|
+
* module-only TooltipWithTriggerBehavior that InfoTip's press-to-pin uses
|
|
9
10
|
* @position Layer component; uses display:contents wrapper to avoid cloneElement
|
|
10
11
|
*
|
|
11
12
|
* SYNC: When modified, update these files to stay in sync:
|
|
@@ -23,20 +24,18 @@ import React, {
|
|
|
23
24
|
import {useIsomorphicLayoutEffect} from '../hooks/useIsomorphicLayoutEffect';
|
|
24
25
|
import * as stylex from '@stylexjs/stylex';
|
|
25
26
|
import {
|
|
26
|
-
|
|
27
|
+
useTooltipWithTriggerBehavior,
|
|
27
28
|
type TooltipFocusTrigger,
|
|
28
|
-
type TooltipTriggerBehavior,
|
|
29
29
|
type TooltipTouchTrigger,
|
|
30
30
|
} from './useTooltip';
|
|
31
|
-
import {
|
|
31
|
+
import {
|
|
32
|
+
stopPressPinClick,
|
|
33
|
+
type LayerTriggerBehavior,
|
|
34
|
+
} from '../Layer/usePressPin';
|
|
32
35
|
import type {LayerAlignment, LayerPlacement} from '../Layer/useLayer';
|
|
33
36
|
import {colorVars} from '../theme/tokens.stylex';
|
|
34
37
|
|
|
35
|
-
export type {
|
|
36
|
-
TooltipFocusTrigger,
|
|
37
|
-
TooltipTriggerBehavior,
|
|
38
|
-
TooltipTouchTrigger,
|
|
39
|
-
} from './useTooltip';
|
|
38
|
+
export type {TooltipFocusTrigger, TooltipTouchTrigger} from './useTooltip';
|
|
40
39
|
|
|
41
40
|
const styles = stylex.create({
|
|
42
41
|
wrapperContents: {
|
|
@@ -118,37 +117,10 @@ export interface TooltipProps {
|
|
|
118
117
|
* - `tap`: tap always opens the tooltip, even on a trigger that acts
|
|
119
118
|
* - `none`: touch never opens the tooltip
|
|
120
119
|
*
|
|
121
|
-
* It decides only under `triggerBehavior="adaptive"`, the default.
|
|
122
|
-
*
|
|
123
120
|
* @default 'auto'
|
|
124
121
|
*/
|
|
125
122
|
touchTrigger?: TooltipTouchTrigger;
|
|
126
123
|
|
|
127
|
-
/**
|
|
128
|
-
* How the trigger opens the tooltip:
|
|
129
|
-
* - `adaptive` (the default): hover and focus preview it. A tap opens it
|
|
130
|
-
* unless the trigger performs an action of its own. While `touchTrigger`
|
|
131
|
-
* remains, it decides those taps.
|
|
132
|
-
* - `hover`: hover and focus preview it; no touch or pen tap opens it.
|
|
133
|
-
* - `toggle`: on a button trigger, a click, a tap, Enter, or Space pins the
|
|
134
|
-
* tooltip open, and the same press closes it. Hover and keyboard focus
|
|
135
|
-
* still preview it. A pinned tooltip stays until Escape, a second press,
|
|
136
|
-
* a press outside, or focus leaving. The press stops at the trigger. Its
|
|
137
|
-
* default action is prevented, and the trigger's own handlers still run.
|
|
138
|
-
* No clickable row or card around the trigger activates. With
|
|
139
|
-
* `anchorRef`, the anchor's own `onClick` runs, and a plain `onClick`
|
|
140
|
-
* element around it receives the press unless that `onClick` stops it.
|
|
141
|
-
* Astryx clickable rows, cards, and containers ignore it, except an Item
|
|
142
|
-
* row when the anchor is not a native button. The trigger reports
|
|
143
|
-
* `aria-expanded` and `aria-controls`, and the tooltip's text is
|
|
144
|
-
* announced once when it pins. Use it for a trigger whose information
|
|
145
|
-
* lives only in the tooltip, such as an info icon. `touchTrigger` is
|
|
146
|
-
* ignored.
|
|
147
|
-
*
|
|
148
|
-
* @default 'adaptive'
|
|
149
|
-
*/
|
|
150
|
-
triggerBehavior?: TooltipTriggerBehavior;
|
|
151
|
-
|
|
152
124
|
/**
|
|
153
125
|
* Whether the tooltip is enabled.
|
|
154
126
|
* When false, hover/focus triggers are disabled.
|
|
@@ -222,7 +194,32 @@ function mergeIds(...ids: (string | undefined | null)[]): string | undefined {
|
|
|
222
194
|
* </Tooltip>
|
|
223
195
|
* ```
|
|
224
196
|
*/
|
|
225
|
-
export function Tooltip({
|
|
197
|
+
export function Tooltip(props: TooltipProps): ReactElement {
|
|
198
|
+
// The option is fixed to `adaptive`, so a spread object that carries it at
|
|
199
|
+
// runtime cannot reach the press-to-pin path.
|
|
200
|
+
return <TooltipWithTriggerBehavior {...props} triggerBehavior="adaptive" />;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* Module-only props for `TooltipWithTriggerBehavior`. Not exported from the
|
|
205
|
+
* package.
|
|
206
|
+
*/
|
|
207
|
+
export interface TooltipWithTriggerBehaviorProps extends TooltipProps {
|
|
208
|
+
/**
|
|
209
|
+
* How the trigger opens the tooltip. `toggle` pins it on a click, a tap,
|
|
210
|
+
* Enter, or Space on a button trigger, and stops that press at the trigger
|
|
211
|
+
* (see `useTooltipWithTriggerBehavior`). InfoTip uses it.
|
|
212
|
+
*
|
|
213
|
+
* @default 'adaptive'
|
|
214
|
+
*/
|
|
215
|
+
triggerBehavior?: LayerTriggerBehavior;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* `Tooltip` with a trigger behavior. Module-only: InfoTip's press-to-pin goes
|
|
220
|
+
* through it, and the package does not export it.
|
|
221
|
+
*/
|
|
222
|
+
export function TooltipWithTriggerBehavior({
|
|
226
223
|
children,
|
|
227
224
|
anchorRef,
|
|
228
225
|
content,
|
|
@@ -238,7 +235,7 @@ export function Tooltip({
|
|
|
238
235
|
hasHoverIndication = 'auto',
|
|
239
236
|
isOpen,
|
|
240
237
|
isDefaultOpen,
|
|
241
|
-
}:
|
|
238
|
+
}: TooltipWithTriggerBehaviorProps): ReactElement {
|
|
242
239
|
const wrapperRef = useRef<HTMLDivElement>(null);
|
|
243
240
|
const textOnly = children != null ? isTextOnly(children) : false;
|
|
244
241
|
|
|
@@ -255,7 +252,7 @@ export function Tooltip({
|
|
|
255
252
|
}, [onOpenChange]);
|
|
256
253
|
|
|
257
254
|
// Use the hook for all tooltip behavior
|
|
258
|
-
const tooltip =
|
|
255
|
+
const tooltip = useTooltipWithTriggerBehavior({
|
|
259
256
|
placement,
|
|
260
257
|
alignment,
|
|
261
258
|
delay,
|
package/src/Tooltip/index.ts
CHANGED
|
@@ -7,33 +7,129 @@ export const docs = {
|
|
|
7
7
|
group: 'Tooltip',
|
|
8
8
|
keywords: ['tooltip', 'hint', 'label', 'hover', 'info', 'title', 'floating'],
|
|
9
9
|
params: [
|
|
10
|
-
{
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
{
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
10
|
+
{
|
|
11
|
+
name: 'placement',
|
|
12
|
+
type: "'above' | 'below' | 'start' | 'end'",
|
|
13
|
+
description:
|
|
14
|
+
"Position relative to the trigger. Logical: start/end resolve against the popover\'s own inherited direction (RTL mirrors in pure CSS).",
|
|
15
|
+
default: "'above'",
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
name: 'alignment',
|
|
19
|
+
type: "'start' | 'center' | 'end'",
|
|
20
|
+
description:
|
|
21
|
+
"Alignment along the placement axis. Logical: start/end resolve against the popover\'s own inherited direction (RTL mirrors in pure CSS).",
|
|
22
|
+
default: "'center'",
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'delay',
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'Delay before showing on hover, in milliseconds.',
|
|
28
|
+
default: '200',
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'hideDelay',
|
|
32
|
+
type: 'number',
|
|
33
|
+
description:
|
|
34
|
+
'Delay before hiding after mouse or focus leaves, in milliseconds.',
|
|
35
|
+
default: '0',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'focusTrigger',
|
|
39
|
+
type: "'auto' | 'always' | 'never'",
|
|
40
|
+
description:
|
|
41
|
+
'When focus should open the tooltip. auto opens when the trigger itself takes focus, or focus lands inside a trigger that is focusable at that moment, so a roving-tabindex member opens when the arrow keys reach it.',
|
|
42
|
+
default: "'auto'",
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'touchTrigger',
|
|
46
|
+
type: "'auto' | 'tap' | 'none'",
|
|
47
|
+
description:
|
|
48
|
+
'What a tap does where there is no hover. auto opens on tap unless the trigger performs an action of its own (an aria-disabled control performs none); tap always opens (a button whose only job is revealing the tooltip); none never opens on touch.',
|
|
49
|
+
default: "'auto'",
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'isEnabled',
|
|
53
|
+
type: 'boolean',
|
|
54
|
+
description: 'Whether hover and focus triggers are enabled.',
|
|
55
|
+
default: 'true',
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: 'isOpen',
|
|
59
|
+
type: 'boolean',
|
|
60
|
+
description:
|
|
61
|
+
'Controlled open state. true force-shows, false force-hides, undefined lets hover/focus manage visibility.',
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
name: 'isDefaultOpen',
|
|
65
|
+
type: 'boolean',
|
|
66
|
+
description: 'Whether the tooltip should be shown on mount.',
|
|
67
|
+
default: 'false',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
name: 'onShow',
|
|
71
|
+
type: '() => void',
|
|
72
|
+
description: 'Callback fired when the tooltip becomes visible.',
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
name: 'onHide',
|
|
76
|
+
type: '() => void',
|
|
77
|
+
description: 'Callback fired when the tooltip is hidden.',
|
|
78
|
+
},
|
|
22
79
|
],
|
|
23
80
|
returns: [
|
|
24
|
-
{
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
81
|
+
{
|
|
82
|
+
name: 'ref',
|
|
83
|
+
type: 'RefCallback<HTMLElement>',
|
|
84
|
+
description:
|
|
85
|
+
'Combined ref that sets both position and interaction on the same trigger element.',
|
|
86
|
+
},
|
|
87
|
+
{
|
|
88
|
+
name: 'positionRef',
|
|
89
|
+
type: 'RefCallback<HTMLElement>',
|
|
90
|
+
description: 'Ref for the positioning anchor element.',
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: 'interactionRef',
|
|
94
|
+
type: 'RefCallback<HTMLElement>',
|
|
95
|
+
description: 'Ref for the hover/focus interaction element.',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
name: 'anchorId',
|
|
99
|
+
type: 'string',
|
|
100
|
+
description: 'CSS anchor name for advanced positioning cases.',
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
name: 'describedBy',
|
|
104
|
+
type: 'string',
|
|
105
|
+
description: 'ID to compose into aria-describedby on the trigger.',
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: 'renderTooltip',
|
|
109
|
+
type: "(children: ReactNode, props?: Omit<ContextRenderProps, 'positioning'>) => ReactNode",
|
|
110
|
+
description:
|
|
111
|
+
'Render function for the anchor-positioned tooltip content. The positioning opt-out is excluded: the tooltip always derives its position from placement/alignment.',
|
|
112
|
+
},
|
|
30
113
|
],
|
|
31
114
|
usage: {
|
|
32
|
-
description:
|
|
115
|
+
description:
|
|
116
|
+
'Headless hook for hover/focus-triggered tooltips. Builds on useLayer with hover intent, keyboard focus handling, and accessible aria-describedby linking. Use for custom trigger elements that need tooltip behavior without the wrapper component.',
|
|
33
117
|
bestPractices: [
|
|
34
|
-
{
|
|
35
|
-
|
|
36
|
-
|
|
118
|
+
{
|
|
119
|
+
guidance: true,
|
|
120
|
+
description:
|
|
121
|
+
'Use for brief text labels that describe icon buttons, truncated text, abbreviations, or compact controls.',
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
guidance: true,
|
|
125
|
+
description:
|
|
126
|
+
'Prefer the Tooltip component for standard wrapping; use the hook when the trigger is not a simple child.',
|
|
127
|
+
},
|
|
128
|
+
{
|
|
129
|
+
guidance: false,
|
|
130
|
+
description:
|
|
131
|
+
'Put interactive content inside tooltips: use Popover or HoverCard instead.',
|
|
132
|
+
},
|
|
37
133
|
],
|
|
38
134
|
},
|
|
39
135
|
relatedComponents: ['Tooltip', 'HoverCard', 'Popover'],
|
|
@@ -44,17 +140,22 @@ export const docs = {
|
|
|
44
140
|
|
|
45
141
|
/** @type {import('@astryxdesign/cli/authoring').HookTranslationDoc} */
|
|
46
142
|
export const docsDense = {
|
|
47
|
-
description:
|
|
143
|
+
description:
|
|
144
|
+
'Headless hover/focus tooltip hook. Builds on useLayer w/ hover intent, keyboard focus handling, aria-describedby. Use for custom triggers without wrapper component.',
|
|
48
145
|
paramDescriptions: {
|
|
49
|
-
placement:
|
|
50
|
-
|
|
146
|
+
placement:
|
|
147
|
+
"position relative to trigger. logical: start/end follow the popover's inherited direction (RTL mirrors).",
|
|
148
|
+
alignment:
|
|
149
|
+
"alignment along placement axis. logical: start/end follow the popover's inherited direction (RTL mirrors).",
|
|
51
150
|
delay: 'show delay in ms.',
|
|
52
151
|
hideDelay: 'hide delay after mouse/focus leave in ms.',
|
|
53
|
-
focusTrigger:
|
|
54
|
-
|
|
55
|
-
|
|
152
|
+
focusTrigger:
|
|
153
|
+
'when focus opens tooltip; auto = focus on the trigger, or inside a trigger focusable when focus arrives.',
|
|
154
|
+
touchTrigger:
|
|
155
|
+
'tap behavior with no hover; auto = tap unless trigger acts, tap = always, none = never.',
|
|
56
156
|
isEnabled: 'whether hover/focus triggers are enabled.',
|
|
57
|
-
isOpen:
|
|
157
|
+
isOpen:
|
|
158
|
+
'controlled open state: true force-show, false force-hide, undefined unmanaged.',
|
|
58
159
|
isDefaultOpen: 'show on mount.',
|
|
59
160
|
onShow: 'fires when tooltip becomes visible.',
|
|
60
161
|
onHide: 'fires when tooltip hides.',
|
|
@@ -68,11 +169,24 @@ export const docsDense = {
|
|
|
68
169
|
renderTooltip: 'renders anchor-positioned tooltip content.',
|
|
69
170
|
},
|
|
70
171
|
usage: {
|
|
71
|
-
description:
|
|
172
|
+
description:
|
|
173
|
+
'Headless hover/focus tooltip hook. Builds on useLayer w/ hover intent, keyboard focus handling, aria-describedby. Use for custom triggers without wrapper component.',
|
|
72
174
|
bestPractices: [
|
|
73
|
-
{
|
|
74
|
-
|
|
75
|
-
|
|
175
|
+
{
|
|
176
|
+
guidance: true,
|
|
177
|
+
description:
|
|
178
|
+
'Use for brief text labels describing icon buttons, truncated text, abbreviations, compact controls.',
|
|
179
|
+
},
|
|
180
|
+
{
|
|
181
|
+
guidance: true,
|
|
182
|
+
description:
|
|
183
|
+
'Prefer Tooltip for standard wrapping; use hook when trigger is not simple child.',
|
|
184
|
+
},
|
|
185
|
+
{
|
|
186
|
+
guidance: false,
|
|
187
|
+
description:
|
|
188
|
+
'Put interactive content in tooltips: use Popover / HoverCard instead.',
|
|
189
|
+
},
|
|
76
190
|
],
|
|
77
191
|
},
|
|
78
192
|
};
|