@kaizen/components 1.68.7 → 1.68.9
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/codemods/README.md +2 -1
- package/dist/cjs/__overlays__/Tooltip/v3/Tooltip.cjs +1 -1
- package/dist/esm/Calendar/CalendarPopover/CalendarPopover.mjs +1 -1
- package/dist/esm/EmptyState/EmptyState.mjs +1 -1
- package/dist/esm/Filter/FilterMultiSelect/subcomponents/ListBox/ListBox.mjs +1 -1
- package/dist/esm/MultiSelect/subcomponents/Popover/Popover.mjs +1 -1
- package/dist/esm/RichTextEditor/RichTextEditor/RichTextEditor.mjs +1 -1
- package/dist/esm/RichTextEditor/RichTextEditor/schema.mjs +1 -1
- package/dist/esm/RichTextEditor/utils/schema/nodes.mjs +1 -1
- package/dist/esm/TimeField/TimeField.mjs +1 -1
- package/dist/esm/__overlays__/Tooltip/v1/Tooltip.mjs +1 -1
- package/dist/esm/__overlays__/Tooltip/v3/Tooltip.mjs +1 -1
- package/dist/styles.css +50 -50
- package/dist/types/__overlays__/Tooltip/v3/Tooltip.d.ts +1 -1
- package/package.json +30 -30
- package/src/Avatar/_docs/Avatar.mdx +3 -4
- package/src/AvatarGroup/_docs/AvatarGroup.mdx +3 -3
- package/src/Badge/_docs/Badge.mdx +3 -3
- package/src/Brand/_docs/Brand.mdx +3 -4
- package/src/BrandMoment/_docs/BrandMoment.mdx +3 -3
- package/src/ButtonGroup/_docs/ButtonGroup.mdx +3 -3
- package/src/Calendar/CalendarRange/_docs/CalendarRange.mdx +3 -3
- package/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx +3 -3
- package/src/Card/_docs/Card.mdx +5 -4
- package/src/Checkbox/Checkbox/_docs/Checkbox.mdx +4 -5
- package/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx +5 -3
- package/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx +4 -3
- package/src/Collapsible/Collapsible/_docs/Collapsible.mdx +3 -3
- package/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx +8 -7
- package/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx +3 -3
- package/src/Container/_docs/Container.mdx +6 -4
- package/src/Content/_docs/Content.mdx +6 -4
- package/src/DatePicker/_docs/DatePicker.mdx +3 -3
- package/src/DateRangePicker/_docs/DateRangePicker.mdx +3 -4
- package/src/Divider/_docs/Divider.mdx +3 -3
- package/src/EmptyState/_docs/EmptyState.mdx +3 -3
- package/src/ErrorPage/_docs/ErrorPage.mdx +3 -3
- package/src/FieldGroup/_docs/FieldGroup.mdx +6 -4
- package/src/FieldMessage/_docs/FieldMessage.mdx +3 -4
- package/src/Filter/Filter/_docs/Filter.mdx +13 -14
- package/src/Filter/FilterBar/_docs/FilterBar.mdx +49 -48
- package/src/Filter/FilterButton/_docs/filter-buttons.mdx +5 -5
- package/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx +8 -3
- package/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx +9 -3
- package/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx +90 -39
- package/src/Filter/FilterMultiSelect/subcomponents/MultiSelectOption/MultiSelectOption.spec.tsx +1 -0
- package/src/Filter/FilterSelect/_docs/FilterSelect.mdx +4 -4
- package/src/GuidanceBlock/_docs/GuidanceBlock.mdx +3 -3
- package/src/Heading/_docs/Heading.mdx +4 -4
- package/src/Icon/_docs/Icon.mdx +5 -7
- package/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx +10 -3
- package/src/Illustration/Scene/_docs/Scene.mdx +5 -8
- package/src/Illustration/Spot/_docs/Spot.mdx +4 -4
- package/src/Input/Input/_docs/Input.mdx +8 -4
- package/src/Input/InputRange/_docs/InputRange.mdx +3 -3
- package/src/Input/InputSearch/_docs/InputSearch.mdx +4 -3
- package/src/KaizenProvider/_docs/KaizenProvider.mdx +9 -9
- package/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx +10 -11
- package/src/Label/_docs/Label.mdx +9 -3
- package/src/LabelledMessage/_docs/LabelledMessage.mdx +3 -3
- package/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx +3 -3
- package/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx +5 -5
- package/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx +3 -3
- package/src/Loading/LoadingInput/_docs/LoadingInput.mdx +3 -3
- package/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx +3 -3
- package/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx +3 -4
- package/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx +3 -3
- package/src/Modal/ContextModal/_docs/ContextModal.mdx +6 -3
- package/src/Modal/GenericModal/_docs/GenericModal.mdx +5 -4
- package/src/Modal/InputEditModal/_docs/InputEditModal.mdx +3 -4
- package/src/MultiSelect/_docs/MultiSelect.mdx +3 -4
- package/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx +3 -3
- package/src/Notification/InlineNotification/_docs/InlineNotification.mdx +3 -4
- package/src/Notification/ToastNotification/_docs/ToastNotification.mdx +3 -3
- package/src/Pagination/_docs/Pagination.mdx +3 -3
- package/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx +3 -3
- package/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx +3 -3
- package/src/Popover/_docs/Popover.mdx +12 -10
- package/src/ProgressBar/_docs/ProgressBar.mdx +3 -4
- package/src/Radio/Radio/_docs/Radio.mdx +4 -4
- package/src/Radio/RadioField/_docs/RadioField.mdx +3 -3
- package/src/Radio/RadioGroup/_docs/RadioGroup.mdx +3 -3
- package/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx +7 -10
- package/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx +3 -5
- package/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx +7 -9
- package/src/RichTextEditor/RichTextEditor/subcomponents/ToggleIconButton/_docs/ToggleIconButton.mdx +3 -3
- package/src/RichTextEditor/RichTextEditor/subcomponents/Toolbar/_docs/Toolbar.mdx +3 -3
- package/src/SearchField/_docs/SearchField.mdx +3 -3
- package/src/Select/_docs/Select.mdx +7 -3
- package/src/Skirt/_docs/Skirt.mdx +4 -4
- package/src/Slider/_docs/Slider.mdx +3 -3
- package/src/SplitButton/_docs/SplitButton.mdx +4 -3
- package/src/Table/_docs/Table.mdx +19 -6
- package/src/Tabs/_docs/Tabs.mdx +4 -7
- package/src/Tag/_docs/Tag.mdx +16 -5
- package/src/Text/_docs/Text.mdx +3 -3
- package/src/TextArea/_docs/TextArea.mdx +5 -4
- package/src/TextAreaField/_docs/TextAreaField.mdx +9 -4
- package/src/TextField/_docs/TextField.mdx +9 -4
- package/src/Tile/InformationTile/_docs/InformationTile.mdx +5 -4
- package/src/Tile/MultiActionTile/_docs/MultiActionTile.mdx +5 -3
- package/src/Tile/TileGrid/_docs/TileGrid.mdx +3 -3
- package/src/TimeField/_docs/TimeField.mdx +3 -3
- package/src/TitleBlockZen/_docs/TitleBlockZen.mdx +5 -3
- package/src/ToggleSwitch/ToggleSwitch/_docs/ToggleSwitch.mdx +3 -3
- package/src/ToggleSwitch/ToggleSwitchField/_docs/ToggleSwitchField.mdx +3 -3
- package/src/VisuallyHidden/_docs/VisuallyHidden.mdx +6 -4
- package/src/Well/_docs/Well.mdx +5 -5
- package/src/Workflow/_docs/ProgressStepper.mdx +3 -3
- package/src/Workflow/_docs/Workflow.mdx +25 -19
- package/src/Workflow/_docs/WorkflowFooter.mdx +3 -3
- package/src/Workflow/_docs/WorkflowHeader.mdx +3 -3
- package/src/__actions__/Button/v1/Button/_docs/Button.mdx +4 -4
- package/src/__actions__/Button/v1/IconButton/_docs/IconButton.mdx +3 -3
- package/src/__actions__/Button/v2/Button/_docs/Button.mdx +4 -4
- package/src/__actions__/Button/v2/IconButton/_docs/IconButton.mdx +3 -3
- package/src/__actions__/Button/v3/_docs/Button--api-specification.mdx +49 -17
- package/src/__actions__/Button/v3/_docs/Button--usage-guidelines.mdx +8 -6
- package/src/__actions__/Menu/v1/_docs/Menu.mdx +3 -4
- package/src/__actions__/Menu/v2/_docs/Menu.mdx +8 -4
- package/src/__actions__/Menu/v3/_docs/ApiSpecification.mdx +35 -24
- package/src/__actions__/Menu/v3/_docs/Menu.mdx +52 -39
- package/src/__future__/Icon/_docs/Icon--api-specification.mdx +17 -10
- package/src/__future__/Icon/_docs/Icon--usage-guidelines.mdx +5 -4
- package/src/__future__/Select/_docs/Select.mdx +9 -5
- package/src/__future__/Tabs/_docs/Tabs--api-specification.mdx +4 -8
- package/src/__future__/Tabs/_docs/Tabs--migration-guide.mdx +11 -4
- package/src/__future__/Tag/RemovableTag/_docs/RemovableTag.mdx +4 -6
- package/src/__future__/Tag/Tag/_docs/Tag-migration-guide.mdx +12 -20
- package/src/__future__/Tag/Tag/_docs/Tag.mdx +3 -4
- package/src/__overlays__/Focusable/v3/_docs/ApiSpecification.mdx +14 -13
- package/src/__overlays__/Tooltip/v1/_docs/Tooltip.mdx +5 -7
- package/src/__overlays__/Tooltip/v2/_docs/Tooltip.mdx +5 -6
- package/src/__overlays__/Tooltip/v3/Tooltip.tsx +3 -2
- package/src/__overlays__/Tooltip/v3/_docs/ApiSpecification.mdx +50 -46
- package/src/__overlays__/Tooltip/v3/_docs/Tooltip.mdx +63 -48
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
import { Canvas, Meta, Controls } from
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { Canvas, Meta, Controls } from '@storybook/blocks'
|
|
2
|
+
import {
|
|
3
|
+
ResourceLinks,
|
|
4
|
+
SbContent,
|
|
5
|
+
Installation,
|
|
6
|
+
DosAndDonts,
|
|
7
|
+
DoOrDont,
|
|
8
|
+
} from '~storybook/components'
|
|
9
|
+
import * as TooltipStories from './Tooltip.docs.stories'
|
|
10
|
+
import AnatomyPng from './assets/tooltip_anatomy.png'
|
|
11
|
+
import PlacementPng from './assets/tooltip_placement.png'
|
|
12
|
+
import DesignSpecPng from './assets/tooltip_spec.png'
|
|
13
|
+
import WhenToUsePng from './assets/tooltip_variant.png'
|
|
8
14
|
|
|
9
15
|
<Meta title="Overlays/Tooltip/v3/Usage Guidelines" />
|
|
10
16
|
|
|
11
17
|
<SbContent>
|
|
12
18
|
# Tooltip (v3)
|
|
13
19
|
|
|
14
|
-
|
|
15
|
-
</SbContent>
|
|
20
|
+
Updated June 25, 2024
|
|
16
21
|
|
|
22
|
+
</SbContent>
|
|
17
23
|
|
|
18
24
|
<ResourceLinks
|
|
19
25
|
sourceCode="https://github.com/cultureamp/kaizen-design-system/tree/main/packages/components/src/Tooltip"
|
|
@@ -29,50 +35,57 @@ import WhenToUsePng from "./assets/tooltip_variant.png"
|
|
|
29
35
|
importStatement='import { Tooltip, TooltipTrigger } from "@kaizen/components/v3/overlays"'
|
|
30
36
|
/>
|
|
31
37
|
|
|
32
|
-
|
|
38
|
+
## Overview
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
</SbContent>
|
|
40
|
+
Tooltips are brief floating labels used to add additional contextual information when users hover, click or focus on an interactive element. These should offer concise explanations, elaborating on the element they are associated with.
|
|
36
41
|
|
|
42
|
+
</SbContent>
|
|
37
43
|
|
|
38
44
|
<Canvas
|
|
39
45
|
of={TooltipStories.Playground}
|
|
40
|
-
source={{
|
|
46
|
+
source={{
|
|
47
|
+
code: `
|
|
41
48
|
<TooltipTrigger>
|
|
42
49
|
<Button label="Button" />
|
|
43
50
|
<Tooltip>Tooltip content</Tooltip>
|
|
44
51
|
</TooltipTrigger>
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
52
|
+
`,
|
|
53
|
+
}}
|
|
54
|
+
/>
|
|
55
|
+
<Controls of={TooltipStories.Playground} include={['placement', 'isOpen']} className="mb-64" />
|
|
49
56
|
|
|
50
57
|
<SbContent className="mb-64">
|
|
51
58
|
### Anatomy
|
|
52
59
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
60
|
+
- The anatomy of a tooltip is made up of a container, description and arrow.
|
|
61
|
+
- **They do not include a title or heading**. If you need to include a title, use a Popover
|
|
62
|
+
- A tooltip is connected to a trigger element, such as a button or icon, that shows the tooltip when the interactive trigger element is hovered or focused. (More details below.)
|
|
63
|
+
|
|
64
|
+
<img
|
|
65
|
+
src={AnatomyPng}
|
|
66
|
+
alt="Indicates the anatomy of the Tooltip component, the Container, Label, Arrow and Trigger"
|
|
67
|
+
className="mt-24"
|
|
68
|
+
/>
|
|
56
69
|
|
|
57
|
-
<img src={AnatomyPng} alt="Indicates the anatomy of the Tooltip component, the Container, Label, Arrow and Trigger" className="mt-24" />
|
|
58
70
|
</ SbContent>
|
|
59
71
|
|
|
60
72
|
<SbContent className="mb-64">
|
|
61
73
|
### When to use
|
|
62
74
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
75
|
+
- Tooltips are used to provide additional information when space is tight.
|
|
76
|
+
- Tooltips must be concise with one or more lines of text.
|
|
77
|
+
- Tooltips must be accessible via hover and focus only.
|
|
78
|
+
- Trigger tooltips from Interactive elements (Buttons, Links, Icon buttons) or Non-interactive elements (Icons, Abbreviations Truncated text)—be mindful of keyboard accessibility
|
|
79
|
+
- **Never include any kind of error messages** in a tooltip
|
|
80
|
+
|
|
81
|
+
<img src={WhenToUsePng} className="mt-32" alt="Illustration of when to use the Tooltip component" />
|
|
68
82
|
|
|
69
|
-
<img src={WhenToUsePng} className="mt-32" alt="Illustration of when to use the Tooltip component" />
|
|
70
83
|
</ SbContent>
|
|
71
84
|
|
|
72
85
|
<SbContent className="mb-64">
|
|
73
86
|
### Specs
|
|
74
87
|
<img src={DesignSpecPng} alt="" />
|
|
75
|
-
</
|
|
88
|
+
</SbContent>
|
|
76
89
|
|
|
77
90
|
<div className="flex flex-col mt-16 gap-40 mb-64">
|
|
78
91
|
<div className="flex flex-col m-0 gap-16">
|
|
@@ -95,6 +108,7 @@ import WhenToUsePng from "./assets/tooltip_variant.png"
|
|
|
95
108
|
<DoOrDont story={TooltipStories.DoFieldTooltip} />
|
|
96
109
|
<DoOrDont story={TooltipStories.DontFieldTooltip} isDont />
|
|
97
110
|
</DosAndDonts>
|
|
111
|
+
|
|
98
112
|
</div>
|
|
99
113
|
|
|
100
114
|
<div className="flex flex-col m-0 gap-16">
|
|
@@ -107,42 +121,44 @@ import WhenToUsePng from "./assets/tooltip_variant.png"
|
|
|
107
121
|
<DoOrDont story={TooltipStories.DoConcise}/>
|
|
108
122
|
<DoOrDont story={TooltipStories.DontConcise} isDont />
|
|
109
123
|
</DosAndDonts>
|
|
124
|
+
|
|
110
125
|
</div>
|
|
111
126
|
</div>
|
|
112
127
|
|
|
113
128
|
<SbContent className="mb-64">
|
|
114
129
|
### Placements
|
|
115
130
|
|
|
116
|
-
|
|
131
|
+
{' '}
|
|
132
|
+
|
|
133
|
+
<img src={PlacementPng} alt="" className="mb-24" />
|
|
134
|
+
|
|
135
|
+
- Type: Dropdown to choose from Default (dark tooltip) and Reverse (light tooltip)
|
|
136
|
+
- Direction: Dropdown to choose where the arrow points
|
|
137
|
+
- Tooltip label: Input field allows you to type in the label from the properties panel
|
|
138
|
+
- Use strong signifiers for trigger elements to ensure the tooltip is discoverable.
|
|
139
|
+
- The proximity of tooltips is always paired to the element with which they are associated.
|
|
117
140
|
|
|
118
|
-
- Type: Dropdown to choose from Default (dark tooltip) and Reverse (light tooltip)
|
|
119
|
-
- Direction: Dropdown to choose where the arrow points
|
|
120
|
-
- Tooltip label: Input field allows you to type in the label from the properties panel
|
|
121
|
-
- Use strong signifiers for trigger elements to ensure the tooltip is discoverable.
|
|
122
|
-
- The proximity of tooltips is always paired to the element with which they are associated.
|
|
123
141
|
</SbContent>
|
|
124
142
|
|
|
125
143
|
<SbContent className="mb-24">
|
|
126
144
|
### Trigger
|
|
127
145
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
146
|
+
- A tooltip trigger needs to be discoverable:
|
|
147
|
+
- E.g. something like an icon to suggest there’s a tooltip.
|
|
148
|
+
- Avoid triggering tooltips from text that excludes a visual indicator (e.g. underline)
|
|
149
|
+
- A tooltip should be shown and accessible on hover, click or on focus events.
|
|
150
|
+
|
|
132
151
|
</SbContent>
|
|
133
152
|
|
|
134
153
|
<div className="mb-32">
|
|
135
154
|
<DosAndDonts>
|
|
136
155
|
<DoOrDont story={TooltipStories.TriggerDo} />
|
|
137
|
-
<DoOrDont story={TooltipStories.TriggerDont} isDont/>
|
|
156
|
+
<DoOrDont story={TooltipStories.TriggerDont} isDont />
|
|
138
157
|
</DosAndDonts>
|
|
139
158
|
</div>
|
|
140
159
|
|
|
141
160
|
<SbContent className="mb-24">
|
|
142
|
-
- Only trigger tooltips from interactive elements, such as:
|
|
143
|
-
- Buttons
|
|
144
|
-
- Links
|
|
145
|
-
- Icon buttons
|
|
161
|
+
- Only trigger tooltips from interactive elements, such as: - Buttons - Links - Icon buttons
|
|
146
162
|
</SbContent>
|
|
147
163
|
|
|
148
164
|
<div className="mb-32">
|
|
@@ -153,9 +169,8 @@ import WhenToUsePng from "./assets/tooltip_variant.png"
|
|
|
153
169
|
</div>
|
|
154
170
|
|
|
155
171
|
<SbContent>
|
|
156
|
-
- Non-interactive elements (be mindful of keyboard accessibility):
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
- For interactive elements that trigger tooltips, only have optional information in the tooltip because it could be missed when the user clicks
|
|
172
|
+
- Non-interactive elements (be mindful of keyboard accessibility): - Icons - Abbreviations (e.g.
|
|
173
|
+
dashed underlined text for HRIS that shows a tooltip that says Human Resource Information System)
|
|
174
|
+
- Truncated text - For interactive elements that trigger tooltips, only have optional information
|
|
175
|
+
in the tooltip because it could be missed when the user clicks
|
|
161
176
|
</SbContent>
|