aural-ui 2.0.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/LICENSE +21 -0
- package/README.md +456 -0
- package/dist/components/aspect-ratio/AspectRatio.stories.tsx +1327 -0
- package/dist/components/aspect-ratio/index.tsx +10 -0
- package/dist/components/aspect-ratio/meta.ts +8 -0
- package/dist/components/avatar/Avatar.stories.tsx +645 -0
- package/dist/components/avatar/index.tsx +50 -0
- package/dist/components/avatar/meta.ts +8 -0
- package/dist/components/badge/Badge.stories.tsx +169 -0
- package/dist/components/badge/index.tsx +28 -0
- package/dist/components/badge/meta.ts +6 -0
- package/dist/components/banner/Banner.stories.tsx +475 -0
- package/dist/components/banner/index.tsx +256 -0
- package/dist/components/banner/meta.ts +36 -0
- package/dist/components/button/Button.stories.tsx +74 -0
- package/dist/components/button/index.tsx +158 -0
- package/dist/components/button/meta.ts +33 -0
- package/dist/components/card/Card.stories.tsx +377 -0
- package/dist/components/card/index.tsx +85 -0
- package/dist/components/card/meta.ts +14 -0
- package/dist/components/char-count/CharCount.stories.tsx +334 -0
- package/dist/components/char-count/index.tsx +51 -0
- package/dist/components/char-count/meta.ts +13 -0
- package/dist/components/checkbox/Checkbox.stories.tsx +209 -0
- package/dist/components/checkbox/index.tsx +34 -0
- package/dist/components/checkbox/meta.ts +19 -0
- package/dist/components/chip/Chip.stories.tsx +207 -0
- package/dist/components/chip/index.tsx +92 -0
- package/dist/components/chip/meta.ts +17 -0
- package/dist/components/circular-loader/CircularLoader.stories.tsx +741 -0
- package/dist/components/circular-loader/index.tsx +138 -0
- package/dist/components/circular-loader/meta.ts +11 -0
- package/dist/components/collapsible/Collapsible.stories.tsx +319 -0
- package/dist/components/collapsible/index.tsx +158 -0
- package/dist/components/collapsible/meta.ts +22 -0
- package/dist/components/command/Command.stories.tsx +996 -0
- package/dist/components/command/index.tsx +324 -0
- package/dist/components/command/meta.ts +18 -0
- package/dist/components/dialog/Dialog.stories.tsx +963 -0
- package/dist/components/dialog/index.tsx +250 -0
- package/dist/components/dialog/meta.ts +28 -0
- package/dist/components/divider/Divider.stories.tsx +633 -0
- package/dist/components/divider/index.tsx +181 -0
- package/dist/components/divider/meta.ts +12 -0
- package/dist/components/dot-loader/DotLoader.stories.tsx +352 -0
- package/dist/components/dot-loader/index.tsx +78 -0
- package/dist/components/dot-loader/meta.ts +14 -0
- package/dist/components/dropdown/Dropdown.stories.tsx +1210 -0
- package/dist/components/dropdown/index.tsx +479 -0
- package/dist/components/dropdown/meta.ts +21 -0
- package/dist/components/form/Form.stories.tsx +320 -0
- package/dist/components/form/index.tsx +183 -0
- package/dist/components/form/meta.ts +11 -0
- package/dist/components/helper-text/HelperText.stories.tsx +254 -0
- package/dist/components/helper-text/index.tsx +102 -0
- package/dist/components/helper-text/meta.ts +18 -0
- package/dist/components/hover-card/HoverCard.stories.tsx +1328 -0
- package/dist/components/hover-card/index.tsx +42 -0
- package/dist/components/hover-card/meta.ts +12 -0
- package/dist/components/icon-button/IconButton.stories.tsx +252 -0
- package/dist/components/icon-button/index.tsx +130 -0
- package/dist/components/icon-button/meta.ts +20 -0
- package/dist/components/if-else/if-else.stories.tsx +100 -0
- package/dist/components/if-else/index.tsx +56 -0
- package/dist/components/if-else/meta.ts +6 -0
- package/dist/components/index.ts +70 -0
- package/dist/components/input/Input.stories.tsx +431 -0
- package/dist/components/input/index.tsx +487 -0
- package/dist/components/input/meta.ts +28 -0
- package/dist/components/label/Label.stories.tsx +200 -0
- package/dist/components/label/index.tsx +43 -0
- package/dist/components/label/meta.ts +14 -0
- package/dist/components/list/List.stories.tsx +963 -0
- package/dist/components/list/index.tsx +567 -0
- package/dist/components/list/meta.ts +24 -0
- package/dist/components/marquee/Marquee.stories.tsx +819 -0
- package/dist/components/marquee/index.tsx +107 -0
- package/dist/components/marquee/meta.ts +6 -0
- package/dist/components/overlay/Overlay.stories.tsx +954 -0
- package/dist/components/overlay/index.tsx +58 -0
- package/dist/components/overlay/meta.ts +10 -0
- package/dist/components/pagination/Pagination.stories.tsx +354 -0
- package/dist/components/pagination/index.tsx +455 -0
- package/dist/components/pagination/meta.ts +29 -0
- package/dist/components/popover/Popover.stories.tsx +1037 -0
- package/dist/components/popover/index.tsx +67 -0
- package/dist/components/popover/meta.ts +12 -0
- package/dist/components/radio/Radio.stories.tsx +146 -0
- package/dist/components/radio/index.tsx +41 -0
- package/dist/components/radio/meta.ts +19 -0
- package/dist/components/resizable/Resizable.stories.tsx +866 -0
- package/dist/components/resizable/index.tsx +55 -0
- package/dist/components/resizable/meta.ts +12 -0
- package/dist/components/scroll-area/ScrollArea.stories.tsx +1104 -0
- package/dist/components/scroll-area/index.tsx +55 -0
- package/dist/components/scroll-area/meta.ts +8 -0
- package/dist/components/search/Search.stories.tsx +678 -0
- package/dist/components/search/index.tsx +141 -0
- package/dist/components/search/meta.ts +6 -0
- package/dist/components/select/Select.stories.tsx +962 -0
- package/dist/components/select/index.tsx +512 -0
- package/dist/components/select/meta.ts +40 -0
- package/dist/components/sheet/Sheet.stories.tsx +1060 -0
- package/dist/components/sheet/index.tsx +440 -0
- package/dist/components/sheet/meta.ts +38 -0
- package/dist/components/skelton/Skelton.stories.tsx +859 -0
- package/dist/components/skelton/index.tsx +17 -0
- package/dist/components/skelton/meta.ts +6 -0
- package/dist/components/slider/Slider.stories.tsx +876 -0
- package/dist/components/slider/index.tsx +156 -0
- package/dist/components/slider/meta.ts +29 -0
- package/dist/components/stepper/Stepper.stories.tsx +639 -0
- package/dist/components/stepper/index.tsx +650 -0
- package/dist/components/stepper/meta.ts +19 -0
- package/dist/components/switch/Switch.stories.tsx +85 -0
- package/dist/components/switch/index.tsx +37 -0
- package/dist/components/switch/meta.ts +24 -0
- package/dist/components/switch-case/SwitchCase.stories.tsx +209 -0
- package/dist/components/switch-case/index.tsx +89 -0
- package/dist/components/switch-case/meta.ts +6 -0
- package/dist/components/table/Table.stories.tsx +1095 -0
- package/dist/components/table/index.tsx +113 -0
- package/dist/components/table/meta.ts +20 -0
- package/dist/components/tabs/Tabs.stories.tsx +1379 -0
- package/dist/components/tabs/index.tsx +186 -0
- package/dist/components/tabs/meta.ts +25 -0
- package/dist/components/tag/Tag.stories.tsx +625 -0
- package/dist/components/tag/index.tsx +320 -0
- package/dist/components/tag/meta.ts +52 -0
- package/dist/components/textarea/TextArea.stories.tsx +723 -0
- package/dist/components/textarea/index.tsx +480 -0
- package/dist/components/textarea/meta.ts +23 -0
- package/dist/components/toast/Toast.stories.tsx +1427 -0
- package/dist/components/toast/index.tsx +26 -0
- package/dist/components/toast/meta.ts +19 -0
- package/dist/components/toggle/Toggle.stories.tsx +1093 -0
- package/dist/components/toggle/index.tsx +44 -0
- package/dist/components/toggle/meta.ts +19 -0
- package/dist/components/tooltip/Tooltip.stories.tsx +1548 -0
- package/dist/components/tooltip/index.tsx +304 -0
- package/dist/components/tooltip/meta.ts +21 -0
- package/dist/components/typography/Typography.stories.tsx +197 -0
- package/dist/components/typography/index.tsx +184 -0
- package/dist/components/typography/meta.ts +38 -0
- package/dist/fonts/LabGrotesque-Regular.ttf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Bold.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Light.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Medium.otf +0 -0
- package/dist/fonts/LabGrotesqueTRIAL-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Regular (1).otf +0 -0
- package/dist/fonts/PPSupplySans-Regular.otf +0 -0
- package/dist/fonts/PPSupplySans-Ultralight.otf +0 -0
- package/dist/hooks/index.ts +3 -0
- package/dist/hooks/use-previous/UsePrevious.stories.tsx +997 -0
- package/dist/hooks/use-previous/index.ts +15 -0
- package/dist/hooks/use-previous/meta.ts +6 -0
- package/dist/hooks/use-standalone-pagination/UseStandalonePagination.stories.tsx +983 -0
- package/dist/hooks/use-standalone-pagination/index.ts +146 -0
- package/dist/hooks/use-standalone-pagination/meta.ts +6 -0
- package/dist/icons/Icons.stories.tsx +29 -0
- package/dist/icons/alert-icon/AlertIcon.stories.tsx +991 -0
- package/dist/icons/alert-icon/index.tsx +48 -0
- package/dist/icons/alert-icon/meta.ts +8 -0
- package/dist/icons/all-icons.tsx +738 -0
- package/dist/icons/angle-down-icon/AngleDownIcon.stories.tsx +1031 -0
- package/dist/icons/angle-down-icon/index.tsx +25 -0
- package/dist/icons/angle-down-icon/meta.ts +8 -0
- package/dist/icons/arrow-box-left-icon/ArrowBoxLeftIcon.stories.tsx +1080 -0
- package/dist/icons/arrow-box-left-icon/index.tsx +24 -0
- package/dist/icons/arrow-box-left-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-icon/ArrowRightIcon.stories.tsx +1151 -0
- package/dist/icons/arrow-right-icon/index.tsx +26 -0
- package/dist/icons/arrow-right-icon/meta.ts +8 -0
- package/dist/icons/arrow-right-up-icon/ArrowRightUpIcon.stories.tsx +1273 -0
- package/dist/icons/arrow-right-up-icon/index.tsx +24 -0
- package/dist/icons/arrow-right-up-icon/meta.ts +8 -0
- package/dist/icons/art-board-icon/ArtBoardIcon.stories.tsx +670 -0
- package/dist/icons/art-board-icon/index.tsx +24 -0
- package/dist/icons/art-board-icon/meta.ts +7 -0
- package/dist/icons/audio-bar-icon/AudioBarIcon.stories.tsx +1244 -0
- package/dist/icons/audio-bar-icon/index.tsx +19 -0
- package/dist/icons/audio-bar-icon/meta.ts +8 -0
- package/dist/icons/bubble-check-icon/BubbleCheckIcon.stories.tsx +1239 -0
- package/dist/icons/bubble-check-icon/index.tsx +24 -0
- package/dist/icons/bubble-check-icon/meta.ts +8 -0
- package/dist/icons/bubble-crossed-icon/BubbleCrossedIcon.stories.tsx +1228 -0
- package/dist/icons/bubble-crossed-icon/index.tsx +24 -0
- package/dist/icons/bubble-crossed-icon/meta.ts +8 -0
- package/dist/icons/bubble-sparkle-icon/BubbleSparkleIcon.stories.tsx +912 -0
- package/dist/icons/bubble-sparkle-icon/index.tsx +26 -0
- package/dist/icons/bubble-sparkle-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-left-icon/ChevronDoubleLeftIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-left-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-double-right-icon/ChevronDoubleRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-double-right-icon/index.tsx +34 -0
- package/dist/icons/chevron-double-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-down-icon/ChevronDownIcon.stories.tsx +1001 -0
- package/dist/icons/chevron-down-icon/index.tsx +27 -0
- package/dist/icons/chevron-down-icon/meta.ts +8 -0
- package/dist/icons/chevron-left-icon/ChevronLeftIcon.stories.tsx +1029 -0
- package/dist/icons/chevron-left-icon/index.tsx +27 -0
- package/dist/icons/chevron-left-icon/meta.ts +8 -0
- package/dist/icons/chevron-right-icon/ChevronRightIcon.stories.tsx +1021 -0
- package/dist/icons/chevron-right-icon/index.tsx +27 -0
- package/dist/icons/chevron-right-icon/meta.ts +8 -0
- package/dist/icons/chevron-up-icon/ChevronUpIcon.stories.tsx +1036 -0
- package/dist/icons/chevron-up-icon/index.tsx +27 -0
- package/dist/icons/chevron-up-icon/meta.ts +8 -0
- package/dist/icons/command-icon/CommandIcon.stories.tsx +1098 -0
- package/dist/icons/command-icon/index.tsx +24 -0
- package/dist/icons/command-icon/meta.ts +8 -0
- package/dist/icons/cross-circle-icon/CrossCircleIcon.stories.tsx +1061 -0
- package/dist/icons/cross-circle-icon/index.tsx +23 -0
- package/dist/icons/cross-circle-icon/meta.ts +8 -0
- package/dist/icons/cross-icon/CrossIcon.stories.tsx +1027 -0
- package/dist/icons/cross-icon/index.tsx +24 -0
- package/dist/icons/cross-icon/meta.ts +8 -0
- package/dist/icons/edit-big-icon/EditBigIcon.stories.tsx +1092 -0
- package/dist/icons/edit-big-icon/index.tsx +22 -0
- package/dist/icons/edit-big-icon/meta.ts +8 -0
- package/dist/icons/eye-close-icon/EyeCloseIcon.stories.tsx +1090 -0
- package/dist/icons/eye-close-icon/index.tsx +26 -0
- package/dist/icons/eye-close-icon/meta.ts +8 -0
- package/dist/icons/eye-open-icon/EyeOpenIcon.stories.tsx +1098 -0
- package/dist/icons/eye-open-icon/index.tsx +24 -0
- package/dist/icons/eye-open-icon/meta.ts +8 -0
- package/dist/icons/feature-shine-icon/FeatureShineIcon.stories.tsx +1071 -0
- package/dist/icons/feature-shine-icon/index.tsx +29 -0
- package/dist/icons/feature-shine-icon/meta.ts +8 -0
- package/dist/icons/file-chart-icon/FileChartIcon.stories.tsx +1115 -0
- package/dist/icons/file-chart-icon/index.tsx +24 -0
- package/dist/icons/file-chart-icon/meta.ts +8 -0
- package/dist/icons/file-text-icon/FileTextIcon.stories.tsx +668 -0
- package/dist/icons/file-text-icon/index.tsx +24 -0
- package/dist/icons/file-text-icon/meta.ts +8 -0
- package/dist/icons/grip-vertical-icon/GripVerticalIcon.stories.tsx +1239 -0
- package/dist/icons/grip-vertical-icon/index.tsx +28 -0
- package/dist/icons/grip-vertical-icon/meta.ts +8 -0
- package/dist/icons/image-icon/ImageIcon.stories.tsx +1181 -0
- package/dist/icons/image-icon/index.tsx +24 -0
- package/dist/icons/image-icon/meta.ts +8 -0
- package/dist/icons/import-folder-icon/ImportFolderIcon.stories.tsx +1248 -0
- package/dist/icons/import-folder-icon/index.tsx +22 -0
- package/dist/icons/import-folder-icon/meta.ts +8 -0
- package/dist/icons/index.ts +46 -0
- package/dist/icons/light-bulb-simple-icon/LightBulbSimpleIcon.stories.tsx +1272 -0
- package/dist/icons/light-bulb-simple-icon/index.tsx +24 -0
- package/dist/icons/light-bulb-simple-icon/meta.ts +8 -0
- package/dist/icons/magic-book-icon/MagicBookIcon.stories.tsx +1245 -0
- package/dist/icons/magic-book-icon/index.tsx +32 -0
- package/dist/icons/magic-book-icon/meta.ts +8 -0
- package/dist/icons/maintenance-icon/MaintenanceIcon.stories.tsx +1251 -0
- package/dist/icons/maintenance-icon/index.tsx +23 -0
- package/dist/icons/maintenance-icon/meta.ts +8 -0
- package/dist/icons/message-icon/MessageIcon.stories.tsx +595 -0
- package/dist/icons/message-icon/index.tsx +30 -0
- package/dist/icons/message-icon/meta.ts +8 -0
- package/dist/icons/move-horizontal-icon/MoveHorizontalIcon.stories.tsx +1245 -0
- package/dist/icons/move-horizontal-icon/index.tsx +23 -0
- package/dist/icons/move-horizontal-icon/meta.ts +8 -0
- package/dist/icons/move-vertical-icon/MoveVerticalIcon.stories.tsx +1196 -0
- package/dist/icons/move-vertical-icon/index.tsx +23 -0
- package/dist/icons/move-vertical-icon/meta.ts +8 -0
- package/dist/icons/page-search-icon/PageSearchIcon.stories.tsx +1167 -0
- package/dist/icons/page-search-icon/index.tsx +21 -0
- package/dist/icons/page-search-icon/meta.ts +8 -0
- package/dist/icons/pencil-icon/PencilIcon.stories.tsx +1131 -0
- package/dist/icons/pencil-icon/index.tsx +21 -0
- package/dist/icons/pencil-icon/meta.ts +8 -0
- package/dist/icons/plus-icon/PlusIcon.stories.tsx +1151 -0
- package/dist/icons/plus-icon/index.tsx +24 -0
- package/dist/icons/plus-icon/meta.ts +8 -0
- package/dist/icons/search-icon/SearchIcon.stories.tsx +1181 -0
- package/dist/icons/search-icon/index.tsx +24 -0
- package/dist/icons/search-icon/meta.ts +8 -0
- package/dist/icons/site-logo-icon/SiteLogoIcon.stories.tsx +1167 -0
- package/dist/icons/site-logo-icon/index.tsx +79 -0
- package/dist/icons/site-logo-icon/meta.ts +8 -0
- package/dist/icons/spinner-gradient-icon/SpinnerGradientIcon.stories.tsx +637 -0
- package/dist/icons/spinner-gradient-icon/index.tsx +53 -0
- package/dist/icons/spinner-gradient-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-icon/SpinnerSolidIcon.stories.tsx +644 -0
- package/dist/icons/spinner-solid-icon/index.tsx +59 -0
- package/dist/icons/spinner-solid-icon/meta.ts +8 -0
- package/dist/icons/spinner-solid-neutral-icon/SpinnerSolidINeutralcon.stories.tsx +736 -0
- package/dist/icons/spinner-solid-neutral-icon/index.tsx +53 -0
- package/dist/icons/spinner-solid-neutral-icon/meta.ts +8 -0
- package/dist/icons/tick-circle-icon/TickCircleIcon.stories.tsx +1204 -0
- package/dist/icons/tick-circle-icon/index.tsx +23 -0
- package/dist/icons/tick-circle-icon/meta.ts +8 -0
- package/dist/icons/tick-icon/TickIcon.stories.tsx +1340 -0
- package/dist/icons/tick-icon/index.tsx +24 -0
- package/dist/icons/tick-icon/meta.ts +8 -0
- package/dist/icons/trash-icon/TrashIcon.stories.tsx +996 -0
- package/dist/icons/trash-icon/index.tsx +24 -0
- package/dist/icons/trash-icon/meta.ts +8 -0
- package/dist/icons/upload-icon/UploadIcon.stories.tsx +947 -0
- package/dist/icons/upload-icon/index.tsx +24 -0
- package/dist/icons/upload-icon/meta.ts +8 -0
- package/dist/icons/vertical-menu-icon/VerticalMenuIcon.stories.tsx +1045 -0
- package/dist/icons/vertical-menu-icon/index.tsx +27 -0
- package/dist/icons/vertical-menu-icon/meta.ts +8 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +206 -0
- package/dist/lib/utils.ts +6 -0
- package/dist/styles/aural-theme.css +1008 -0
- package/package.json +142 -0
|
@@ -0,0 +1,1548 @@
|
|
|
1
|
+
import React from "react"
|
|
2
|
+
import { Button } from "@components/button"
|
|
3
|
+
import {
|
|
4
|
+
AlertIcon,
|
|
5
|
+
EditBigIcon,
|
|
6
|
+
EyeCloseIcon,
|
|
7
|
+
EyeOpenIcon,
|
|
8
|
+
FileChartIcon,
|
|
9
|
+
PlusIcon,
|
|
10
|
+
SearchIcon,
|
|
11
|
+
TickCircleIcon,
|
|
12
|
+
TrashIcon,
|
|
13
|
+
} from "@icons/index"
|
|
14
|
+
import type { Meta, StoryObj } from "@storybook/react"
|
|
15
|
+
|
|
16
|
+
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "."
|
|
17
|
+
|
|
18
|
+
const meta: Meta<typeof Tooltip> = {
|
|
19
|
+
title: "Components/UI/Tooltip",
|
|
20
|
+
component: Tooltip,
|
|
21
|
+
parameters: {
|
|
22
|
+
layout: "centered",
|
|
23
|
+
backgrounds: {
|
|
24
|
+
default: "dark",
|
|
25
|
+
values: [
|
|
26
|
+
{ name: "dark", value: "#0a0a0a" },
|
|
27
|
+
{ name: "light", value: "#ffffff" },
|
|
28
|
+
],
|
|
29
|
+
},
|
|
30
|
+
docs: {
|
|
31
|
+
description: {
|
|
32
|
+
component: `
|
|
33
|
+
# Tooltip Component
|
|
34
|
+
|
|
35
|
+
A sophisticated tooltip component built on top of Radix UI's Tooltip primitive with context-based variant management, gradient backgrounds, and comprehensive positioning support.
|
|
36
|
+
|
|
37
|
+
## Complete Props Reference
|
|
38
|
+
|
|
39
|
+
### Tooltip (Root Component)
|
|
40
|
+
The main wrapper component that provides context for all child components.
|
|
41
|
+
|
|
42
|
+
| Prop | Type | Default | Description |
|
|
43
|
+
|------|------|---------|-------------|
|
|
44
|
+
| \`variant\` | \`"dark" | "light"\` | \`"dark"\` | Visual variant that controls styling for content and arrow |
|
|
45
|
+
| \`children\` | \`ReactNode\` | - | Must contain TooltipTrigger and TooltipContent |
|
|
46
|
+
| \`...props\` | \`TooltipRootProps\` | - | All Radix Tooltip.Root props (open, onOpenChange, etc.) |
|
|
47
|
+
|
|
48
|
+
### TooltipTrigger
|
|
49
|
+
The element that triggers the tooltip on hover/focus.
|
|
50
|
+
|
|
51
|
+
| Prop | Type | Default | Description |
|
|
52
|
+
|------|------|---------|-------------|
|
|
53
|
+
| \`asChild\` | \`boolean\` | \`false\` | Merge props with child element instead of rendering button |
|
|
54
|
+
| \`children\` | \`ReactNode\` | - | Trigger element content |
|
|
55
|
+
| \`...props\` | \`TooltipTriggerProps\` | - | All Radix Tooltip.Trigger props |
|
|
56
|
+
|
|
57
|
+
### TooltipContent
|
|
58
|
+
The tooltip content with positioning, styling, and arrow.
|
|
59
|
+
|
|
60
|
+
| Prop | Type | Default | Description |
|
|
61
|
+
|------|------|---------|-------------|
|
|
62
|
+
| \`side\` | \`"top" | "right" | "bottom" | "left"\` | \`"top"\` | Which side of trigger to position tooltip |
|
|
63
|
+
| \`align\` | \`"start" | "center" | "end"\` | \`"center"\` | Alignment relative to trigger (for top/bottom sides) |
|
|
64
|
+
| \`sideOffset\` | \`number\` | \`0\` | Distance in pixels between tooltip and trigger |
|
|
65
|
+
| \`className\` | \`string\` | - | Additional CSS classes |
|
|
66
|
+
| \`children\` | \`ReactNode\` | - | Tooltip content |
|
|
67
|
+
| \`...props\` | \`TooltipContentProps\` | - | All Radix Tooltip.Content props |
|
|
68
|
+
|
|
69
|
+
### TooltipProvider (Optional)
|
|
70
|
+
Global provider for controlling tooltip behavior across multiple tooltips.
|
|
71
|
+
|
|
72
|
+
| Prop | Type | Default | Description |
|
|
73
|
+
|------|------|---------|-------------|
|
|
74
|
+
| \`delayDuration\` | \`number\` | \`0\` | Delay in milliseconds before tooltip appears |
|
|
75
|
+
| \`skipDelayDuration\` | \`number\` | \`300\` | Time to skip delay when moving between tooltips |
|
|
76
|
+
| \`disableHoverableContent\` | \`boolean\` | \`false\` | Disable hovering over tooltip content |
|
|
77
|
+
| \`children\` | \`ReactNode\` | - | App content with tooltips |
|
|
78
|
+
|
|
79
|
+
## Positioning Matrix
|
|
80
|
+
|
|
81
|
+
### Available Combinations
|
|
82
|
+
- **Top Side**: start, center, end alignments (3 combinations)
|
|
83
|
+
- **Right Side**: center alignment only (1 combination)
|
|
84
|
+
- **Bottom Side**: start, center, end alignments (3 combinations)
|
|
85
|
+
- **Left Side**: center alignment only (1 combination)
|
|
86
|
+
|
|
87
|
+
**Total: 8 positioning combinations × 2 variants = 16 total variations**
|
|
88
|
+
|
|
89
|
+
### Gradient System
|
|
90
|
+
Each positioning combination has a unique gradient optimized for that specific placement:
|
|
91
|
+
|
|
92
|
+
#### Dark Variant Gradients
|
|
93
|
+
- **Colors**: Purple (\`--fmSecondary-200\`) to dark transparent
|
|
94
|
+
- **Purpose**: Create visual connection from arrow to trigger
|
|
95
|
+
- **Style**: Single radial gradients
|
|
96
|
+
|
|
97
|
+
#### Light Variant Gradients
|
|
98
|
+
- **Colors**: Light purple (\`--fmSecondary-800\`) to white transparent
|
|
99
|
+
- **Purpose**: Sophisticated light theme integration
|
|
100
|
+
- **Style**: Complex multi-layer linear + radial gradients
|
|
101
|
+
|
|
102
|
+
## Usage Patterns
|
|
103
|
+
|
|
104
|
+
### Basic Usage
|
|
105
|
+
\`\`\`tsx
|
|
106
|
+
<Tooltip variant="dark">
|
|
107
|
+
<TooltipTrigger>Hover me</TooltipTrigger>
|
|
108
|
+
<TooltipContent>
|
|
109
|
+
Simple tooltip content
|
|
110
|
+
</TooltipContent>
|
|
111
|
+
</Tooltip>
|
|
112
|
+
\`\`\`
|
|
113
|
+
|
|
114
|
+
### Positioned Tooltip
|
|
115
|
+
\`\`\`tsx
|
|
116
|
+
<Tooltip variant="light">
|
|
117
|
+
<TooltipTrigger asChild>
|
|
118
|
+
<Button>Action Button</Button>
|
|
119
|
+
</TooltipTrigger>
|
|
120
|
+
<TooltipContent side="bottom" align="start" sideOffset={8}>
|
|
121
|
+
Positioned tooltip with offset
|
|
122
|
+
</TooltipContent>
|
|
123
|
+
</Tooltip>
|
|
124
|
+
\`\`\`
|
|
125
|
+
|
|
126
|
+
### With Provider (Multiple Tooltips)
|
|
127
|
+
\`\`\`tsx
|
|
128
|
+
<TooltipProvider delayDuration={500}>
|
|
129
|
+
<Tooltip variant="dark">
|
|
130
|
+
<TooltipTrigger>First</TooltipTrigger>
|
|
131
|
+
<TooltipContent>First tooltip</TooltipContent>
|
|
132
|
+
</Tooltip>
|
|
133
|
+
|
|
134
|
+
<Tooltip variant="light">
|
|
135
|
+
<TooltipTrigger>Second</TooltipTrigger>
|
|
136
|
+
<TooltipContent>Second tooltip</TooltipContent>
|
|
137
|
+
</Tooltip>
|
|
138
|
+
</TooltipProvider>
|
|
139
|
+
\`\`\`
|
|
140
|
+
|
|
141
|
+
### Rich Content
|
|
142
|
+
\`\`\`tsx
|
|
143
|
+
<Tooltip variant="light">
|
|
144
|
+
<TooltipTrigger>Info Button</TooltipTrigger>
|
|
145
|
+
<TooltipContent className="max-w-xs" side="right">
|
|
146
|
+
<div className="space-y-2">
|
|
147
|
+
<div className="font-medium">Feature Details</div>
|
|
148
|
+
<div className="text-xs opacity-70">
|
|
149
|
+
This feature allows you to perform advanced actions
|
|
150
|
+
with keyboard shortcuts.
|
|
151
|
+
</div>
|
|
152
|
+
<div className="text-xs">
|
|
153
|
+
Shortcut: <kbd>Ctrl+K</kbd>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</TooltipContent>
|
|
157
|
+
</Tooltip>
|
|
158
|
+
\`\`\`
|
|
159
|
+
|
|
160
|
+
## Best Practices
|
|
161
|
+
|
|
162
|
+
### Positioning
|
|
163
|
+
- Use \`center\` alignment for most cases
|
|
164
|
+
- Use \`start\`/\`end\` for edge-aligned triggers
|
|
165
|
+
- Add \`sideOffset\` for better visual separation
|
|
166
|
+
- Consider viewport boundaries for edge cases
|
|
167
|
+
|
|
168
|
+
### Content Guidelines
|
|
169
|
+
- Keep text concise and actionable
|
|
170
|
+
- Include keyboard shortcuts when relevant
|
|
171
|
+
- Provide context, not just label repetition
|
|
172
|
+
- Use rich content for complex information
|
|
173
|
+
|
|
174
|
+
### Performance
|
|
175
|
+
- Wrap multiple tooltips in single \`TooltipProvider\`
|
|
176
|
+
- Use appropriate delay durations for UX
|
|
177
|
+
- Consider tooltip density in complex UIs
|
|
178
|
+
|
|
179
|
+
### Accessibility
|
|
180
|
+
- Proper ARIA attributes automatically applied
|
|
181
|
+
- Keyboard navigation support included
|
|
182
|
+
- Screen reader announcements handled
|
|
183
|
+
- Focus management for interactive triggers
|
|
184
|
+
|
|
185
|
+
`,
|
|
186
|
+
},
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
tags: ["autodocs"],
|
|
190
|
+
argTypes: {
|
|
191
|
+
variant: {
|
|
192
|
+
control: "select",
|
|
193
|
+
options: ["dark", "light"],
|
|
194
|
+
description:
|
|
195
|
+
"Visual variant applied to tooltip content and arrow. Determines gradient styling and color scheme.",
|
|
196
|
+
table: {
|
|
197
|
+
type: { summary: '"dark" | "light"' },
|
|
198
|
+
defaultValue: { summary: '"dark"' },
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
delayDuration: {
|
|
202
|
+
control: { type: "number", min: 0, max: 2000, step: 100 },
|
|
203
|
+
description:
|
|
204
|
+
"Delay before tooltip appears (ms). Set on TooltipProvider to affect all tooltips.",
|
|
205
|
+
table: {
|
|
206
|
+
type: { summary: "number" },
|
|
207
|
+
defaultValue: { summary: "0" },
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
export default meta
|
|
214
|
+
type Story = StoryObj<typeof Tooltip>
|
|
215
|
+
|
|
216
|
+
// 1. Basic Tooltip
|
|
217
|
+
export const Basic: Story = {
|
|
218
|
+
render: () => (
|
|
219
|
+
<div className="p-8">
|
|
220
|
+
<Tooltip variant="dark">
|
|
221
|
+
<TooltipTrigger asChild>
|
|
222
|
+
<Button variant="outline">Hover for tooltip</Button>
|
|
223
|
+
</TooltipTrigger>
|
|
224
|
+
<TooltipContent>
|
|
225
|
+
<p>This is a basic dark tooltip</p>
|
|
226
|
+
</TooltipContent>
|
|
227
|
+
</Tooltip>
|
|
228
|
+
</div>
|
|
229
|
+
),
|
|
230
|
+
parameters: {
|
|
231
|
+
docs: {
|
|
232
|
+
description: {
|
|
233
|
+
story:
|
|
234
|
+
"A simple tooltip with dark variant that appears on hover. The variant is set once on the Tooltip component and inherited by the content and arrow.",
|
|
235
|
+
},
|
|
236
|
+
},
|
|
237
|
+
},
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
// 2. Variant Comparison
|
|
241
|
+
export const VariantComparison: Story = {
|
|
242
|
+
render: () => (
|
|
243
|
+
<div className="grid grid-cols-1 gap-8 p-8 lg:grid-cols-2">
|
|
244
|
+
<div className="space-y-4">
|
|
245
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
246
|
+
Dark Variant (Default)
|
|
247
|
+
</h3>
|
|
248
|
+
<div className="flex justify-center">
|
|
249
|
+
<Tooltip variant="dark">
|
|
250
|
+
<TooltipTrigger asChild>
|
|
251
|
+
<Button variant="outline">Dark Tooltip</Button>
|
|
252
|
+
</TooltipTrigger>
|
|
253
|
+
<TooltipContent>
|
|
254
|
+
<p>Dark variant with purple gradient background</p>
|
|
255
|
+
</TooltipContent>
|
|
256
|
+
</Tooltip>
|
|
257
|
+
</div>
|
|
258
|
+
</div>
|
|
259
|
+
|
|
260
|
+
<div className="space-y-4">
|
|
261
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
262
|
+
Light Variant
|
|
263
|
+
</h3>
|
|
264
|
+
<div className="flex justify-center">
|
|
265
|
+
<Tooltip variant="light">
|
|
266
|
+
<TooltipTrigger asChild>
|
|
267
|
+
<Button variant="outline">Light Tooltip</Button>
|
|
268
|
+
</TooltipTrigger>
|
|
269
|
+
<TooltipContent>
|
|
270
|
+
<p>Light variant with sophisticated light gradients</p>
|
|
271
|
+
</TooltipContent>
|
|
272
|
+
</Tooltip>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
),
|
|
277
|
+
parameters: {
|
|
278
|
+
docs: {
|
|
279
|
+
description: {
|
|
280
|
+
story:
|
|
281
|
+
"Comparison of the two available variants. Notice how the arrow automatically matches the tooltip background for each variant with unique gradient styling.",
|
|
282
|
+
},
|
|
283
|
+
},
|
|
284
|
+
},
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
// 3. Complete Positioning Matrix
|
|
288
|
+
export const CompletePositioningMatrix: Story = {
|
|
289
|
+
render: () => (
|
|
290
|
+
<div className="space-y-12 p-12">
|
|
291
|
+
<h3 className="text-center text-xl font-medium text-white">
|
|
292
|
+
Complete Positioning Matrix - All Combinations
|
|
293
|
+
</h3>
|
|
294
|
+
|
|
295
|
+
{/* Top Side - All Alignments */}
|
|
296
|
+
<div className="space-y-6">
|
|
297
|
+
<h4 className="text-center text-lg font-medium text-white/80">
|
|
298
|
+
Top Side Tooltips
|
|
299
|
+
</h4>
|
|
300
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
301
|
+
<div className="flex flex-col items-center gap-4">
|
|
302
|
+
<span className="text-sm text-white/60">Top + Start (Dark)</span>
|
|
303
|
+
<Tooltip variant="dark">
|
|
304
|
+
<TooltipTrigger asChild>
|
|
305
|
+
<Button variant="outline" size="lg">
|
|
306
|
+
Top Start
|
|
307
|
+
</Button>
|
|
308
|
+
</TooltipTrigger>
|
|
309
|
+
<TooltipContent side="top" align="start">
|
|
310
|
+
<p>Top side, start alignment with gradient from bottom-right</p>
|
|
311
|
+
</TooltipContent>
|
|
312
|
+
</Tooltip>
|
|
313
|
+
</div>
|
|
314
|
+
|
|
315
|
+
<div className="flex flex-col items-center gap-4">
|
|
316
|
+
<span className="text-sm text-white/60">Top + Center (Light)</span>
|
|
317
|
+
<Tooltip variant="light">
|
|
318
|
+
<TooltipTrigger asChild>
|
|
319
|
+
<Button variant="outline" size="lg">
|
|
320
|
+
Top Center
|
|
321
|
+
</Button>
|
|
322
|
+
</TooltipTrigger>
|
|
323
|
+
<TooltipContent side="top" align="center">
|
|
324
|
+
<p>
|
|
325
|
+
Top side, center alignment with gradient from bottom-center
|
|
326
|
+
</p>
|
|
327
|
+
</TooltipContent>
|
|
328
|
+
</Tooltip>
|
|
329
|
+
</div>
|
|
330
|
+
|
|
331
|
+
<div className="flex flex-col items-center gap-4">
|
|
332
|
+
<span className="text-sm text-white/60">Top + End (Dark)</span>
|
|
333
|
+
<Tooltip variant="dark">
|
|
334
|
+
<TooltipTrigger asChild>
|
|
335
|
+
<Button variant="outline" size="lg">
|
|
336
|
+
Top End
|
|
337
|
+
</Button>
|
|
338
|
+
</TooltipTrigger>
|
|
339
|
+
<TooltipContent side="top" align="end">
|
|
340
|
+
<p>Top side, end alignment with gradient from bottom-left</p>
|
|
341
|
+
</TooltipContent>
|
|
342
|
+
</Tooltip>
|
|
343
|
+
</div>
|
|
344
|
+
</div>
|
|
345
|
+
</div>
|
|
346
|
+
|
|
347
|
+
{/* Right & Left Side */}
|
|
348
|
+
<div className="space-y-6">
|
|
349
|
+
<h4 className="text-center text-lg font-medium text-white/80">
|
|
350
|
+
Left & Right Side Tooltips
|
|
351
|
+
</h4>
|
|
352
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
353
|
+
<div className="flex flex-col items-center gap-4">
|
|
354
|
+
<span className="text-sm text-white/60">Left Side (Light)</span>
|
|
355
|
+
<Tooltip variant="light">
|
|
356
|
+
<TooltipTrigger asChild>
|
|
357
|
+
<Button variant="outline" size="lg">
|
|
358
|
+
Left Side
|
|
359
|
+
</Button>
|
|
360
|
+
</TooltipTrigger>
|
|
361
|
+
<TooltipContent side="left">
|
|
362
|
+
<p>Left side positioning with gradient from right edge</p>
|
|
363
|
+
</TooltipContent>
|
|
364
|
+
</Tooltip>
|
|
365
|
+
</div>
|
|
366
|
+
|
|
367
|
+
<div className="flex flex-col items-center gap-4">
|
|
368
|
+
<span className="text-sm text-white/60">Right Side (Dark)</span>
|
|
369
|
+
<Tooltip variant="dark">
|
|
370
|
+
<TooltipTrigger asChild>
|
|
371
|
+
<Button variant="outline" size="lg">
|
|
372
|
+
Right Side
|
|
373
|
+
</Button>
|
|
374
|
+
</TooltipTrigger>
|
|
375
|
+
<TooltipContent side="right">
|
|
376
|
+
<p>Right side positioning with gradient from left edge</p>
|
|
377
|
+
</TooltipContent>
|
|
378
|
+
</Tooltip>
|
|
379
|
+
</div>
|
|
380
|
+
</div>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
{/* Bottom Side - All Alignments */}
|
|
384
|
+
<div className="space-y-6">
|
|
385
|
+
<h4 className="text-center text-lg font-medium text-white/80">
|
|
386
|
+
Bottom Side Tooltips
|
|
387
|
+
</h4>
|
|
388
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
389
|
+
<div className="flex flex-col items-center gap-4">
|
|
390
|
+
<span className="text-sm text-white/60">
|
|
391
|
+
Bottom + Start (Light)
|
|
392
|
+
</span>
|
|
393
|
+
<Tooltip variant="light">
|
|
394
|
+
<TooltipTrigger asChild>
|
|
395
|
+
<Button variant="outline" size="lg">
|
|
396
|
+
Bottom Start
|
|
397
|
+
</Button>
|
|
398
|
+
</TooltipTrigger>
|
|
399
|
+
<TooltipContent side="bottom" align="start">
|
|
400
|
+
<p>Bottom side, start alignment with complex gradient</p>
|
|
401
|
+
</TooltipContent>
|
|
402
|
+
</Tooltip>
|
|
403
|
+
</div>
|
|
404
|
+
|
|
405
|
+
<div className="flex flex-col items-center gap-4">
|
|
406
|
+
<span className="text-sm text-white/60">
|
|
407
|
+
Bottom + Center (Dark)
|
|
408
|
+
</span>
|
|
409
|
+
<Tooltip variant="dark">
|
|
410
|
+
<TooltipTrigger asChild>
|
|
411
|
+
<Button variant="outline" size="lg">
|
|
412
|
+
Bottom Center
|
|
413
|
+
</Button>
|
|
414
|
+
</TooltipTrigger>
|
|
415
|
+
<TooltipContent side="bottom" align="center">
|
|
416
|
+
<p>
|
|
417
|
+
Bottom side, center alignment with gradient from top-center
|
|
418
|
+
</p>
|
|
419
|
+
</TooltipContent>
|
|
420
|
+
</Tooltip>
|
|
421
|
+
</div>
|
|
422
|
+
|
|
423
|
+
<div className="flex flex-col items-center gap-4">
|
|
424
|
+
<span className="text-sm text-white/60">Bottom + End (Light)</span>
|
|
425
|
+
<Tooltip variant="light">
|
|
426
|
+
<TooltipTrigger asChild>
|
|
427
|
+
<Button variant="outline" size="lg">
|
|
428
|
+
Bottom End
|
|
429
|
+
</Button>
|
|
430
|
+
</TooltipTrigger>
|
|
431
|
+
<TooltipContent side="bottom" align="end">
|
|
432
|
+
<p>Bottom side, end alignment with dual gradient system</p>
|
|
433
|
+
</TooltipContent>
|
|
434
|
+
</Tooltip>
|
|
435
|
+
</div>
|
|
436
|
+
</div>
|
|
437
|
+
</div>
|
|
438
|
+
|
|
439
|
+
<div className="space-y-2 text-center text-xs text-white/60">
|
|
440
|
+
<p>
|
|
441
|
+
All 8 positioning combinations shown with unique gradient backgrounds
|
|
442
|
+
</p>
|
|
443
|
+
<p>
|
|
444
|
+
Each gradient is positioned to create visual connection from arrow to
|
|
445
|
+
trigger
|
|
446
|
+
</p>
|
|
447
|
+
<p>
|
|
448
|
+
Notice how light variant tooltips use more complex multi-layer
|
|
449
|
+
gradients
|
|
450
|
+
</p>
|
|
451
|
+
</div>
|
|
452
|
+
</div>
|
|
453
|
+
),
|
|
454
|
+
parameters: {
|
|
455
|
+
layout: "fullscreen",
|
|
456
|
+
docs: {
|
|
457
|
+
description: {
|
|
458
|
+
story:
|
|
459
|
+
"Complete matrix showing all 8 positioning combinations (4 sides × 2-3 alignments each). Each combination has a unique gradient optimized for that specific positioning.",
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
},
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// 4. Offset Variations
|
|
466
|
+
export const OffsetVariations: Story = {
|
|
467
|
+
render: () => (
|
|
468
|
+
<div className="space-y-8 p-8">
|
|
469
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
470
|
+
Side Offset Variations
|
|
471
|
+
</h3>
|
|
472
|
+
|
|
473
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-4">
|
|
474
|
+
<div className="flex flex-col items-center gap-4">
|
|
475
|
+
<span className="text-sm text-white/60">No Offset (0px)</span>
|
|
476
|
+
<Tooltip variant="dark">
|
|
477
|
+
<TooltipTrigger asChild>
|
|
478
|
+
<Button variant="outline">No Gap</Button>
|
|
479
|
+
</TooltipTrigger>
|
|
480
|
+
<TooltipContent side="top" sideOffset={0}>
|
|
481
|
+
<p>sideOffset = 0</p>
|
|
482
|
+
</TooltipContent>
|
|
483
|
+
</Tooltip>
|
|
484
|
+
</div>
|
|
485
|
+
|
|
486
|
+
<div className="flex flex-col items-center gap-4">
|
|
487
|
+
<span className="text-sm text-white/60">Small Offset (4px)</span>
|
|
488
|
+
<Tooltip variant="light">
|
|
489
|
+
<TooltipTrigger asChild>
|
|
490
|
+
<Button variant="outline">Small Gap</Button>
|
|
491
|
+
</TooltipTrigger>
|
|
492
|
+
<TooltipContent side="top" sideOffset={4}>
|
|
493
|
+
<p>sideOffset = 4</p>
|
|
494
|
+
</TooltipContent>
|
|
495
|
+
</Tooltip>
|
|
496
|
+
</div>
|
|
497
|
+
|
|
498
|
+
<div className="flex flex-col items-center gap-4">
|
|
499
|
+
<span className="text-sm text-white/60">Medium Offset (8px)</span>
|
|
500
|
+
<Tooltip variant="dark">
|
|
501
|
+
<TooltipTrigger asChild>
|
|
502
|
+
<Button variant="outline">Medium Gap</Button>
|
|
503
|
+
</TooltipTrigger>
|
|
504
|
+
<TooltipContent side="top" sideOffset={8}>
|
|
505
|
+
<p>sideOffset = 8</p>
|
|
506
|
+
</TooltipContent>
|
|
507
|
+
</Tooltip>
|
|
508
|
+
</div>
|
|
509
|
+
|
|
510
|
+
<div className="flex flex-col items-center gap-4">
|
|
511
|
+
<span className="text-sm text-white/60">Large Offset (16px)</span>
|
|
512
|
+
<Tooltip variant="light">
|
|
513
|
+
<TooltipTrigger asChild>
|
|
514
|
+
<Button variant="outline">Large Gap</Button>
|
|
515
|
+
</TooltipTrigger>
|
|
516
|
+
<TooltipContent side="top" sideOffset={16}>
|
|
517
|
+
<p>sideOffset = 16</p>
|
|
518
|
+
</TooltipContent>
|
|
519
|
+
</Tooltip>
|
|
520
|
+
</div>
|
|
521
|
+
</div>
|
|
522
|
+
|
|
523
|
+
<div className="text-center text-xs text-white/60">
|
|
524
|
+
<p>
|
|
525
|
+
Side offset controls the distance between tooltip and trigger element
|
|
526
|
+
</p>
|
|
527
|
+
</div>
|
|
528
|
+
</div>
|
|
529
|
+
),
|
|
530
|
+
parameters: {
|
|
531
|
+
docs: {
|
|
532
|
+
description: {
|
|
533
|
+
story:
|
|
534
|
+
"Different side offset values showing how to control the gap between tooltip and trigger. Useful for creating breathing room or avoiding overlap.",
|
|
535
|
+
},
|
|
536
|
+
},
|
|
537
|
+
},
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
// 5. Content Variations
|
|
541
|
+
export const ContentVariations: Story = {
|
|
542
|
+
render: () => (
|
|
543
|
+
<div className="space-y-8 p-8">
|
|
544
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
545
|
+
Content Variations with Gradient Backgrounds
|
|
546
|
+
</h3>
|
|
547
|
+
|
|
548
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-2">
|
|
549
|
+
{/* Short Text */}
|
|
550
|
+
<div className="flex flex-col items-center gap-4">
|
|
551
|
+
<span className="text-sm text-white/60">Short Text (Dark)</span>
|
|
552
|
+
<Tooltip variant="dark">
|
|
553
|
+
<TooltipTrigger asChild>
|
|
554
|
+
<Button variant="outline">Save</Button>
|
|
555
|
+
</TooltipTrigger>
|
|
556
|
+
<TooltipContent side="top" align="center">
|
|
557
|
+
<p>Save changes</p>
|
|
558
|
+
</TooltipContent>
|
|
559
|
+
</Tooltip>
|
|
560
|
+
</div>
|
|
561
|
+
|
|
562
|
+
{/* Long Text */}
|
|
563
|
+
<div className="flex flex-col items-center gap-4">
|
|
564
|
+
<span className="text-sm text-white/60">Long Text (Light)</span>
|
|
565
|
+
<Tooltip variant="light">
|
|
566
|
+
<TooltipTrigger asChild>
|
|
567
|
+
<Button variant="outline">Learn More</Button>
|
|
568
|
+
</TooltipTrigger>
|
|
569
|
+
<TooltipContent className="max-w-xs" side="top" align="center">
|
|
570
|
+
<p>
|
|
571
|
+
This is a longer tooltip with more detailed information that
|
|
572
|
+
demonstrates text wrapping with gradient backgrounds.
|
|
573
|
+
</p>
|
|
574
|
+
</TooltipContent>
|
|
575
|
+
</Tooltip>
|
|
576
|
+
</div>
|
|
577
|
+
|
|
578
|
+
{/* Rich Content - Dark */}
|
|
579
|
+
<div className="flex flex-col items-center gap-4">
|
|
580
|
+
<span className="text-sm text-white/60">Rich Content (Dark)</span>
|
|
581
|
+
<Tooltip variant="dark">
|
|
582
|
+
<TooltipTrigger asChild>
|
|
583
|
+
<Button variant="outline">
|
|
584
|
+
<AlertIcon className="h-4 w-4" />
|
|
585
|
+
</Button>
|
|
586
|
+
</TooltipTrigger>
|
|
587
|
+
<TooltipContent className="max-w-sm" side="right">
|
|
588
|
+
<div className="space-y-2">
|
|
589
|
+
<div className="font-medium text-white">Keyboard Shortcut</div>
|
|
590
|
+
<div className="text-xs text-white/80">
|
|
591
|
+
Use{" "}
|
|
592
|
+
<kbd className="rounded bg-white/20 px-1 py-0.5 text-xs">
|
|
593
|
+
Ctrl+S
|
|
594
|
+
</kbd>{" "}
|
|
595
|
+
to save your work quickly.
|
|
596
|
+
</div>
|
|
597
|
+
</div>
|
|
598
|
+
</TooltipContent>
|
|
599
|
+
</Tooltip>
|
|
600
|
+
</div>
|
|
601
|
+
|
|
602
|
+
{/* List Content - Light */}
|
|
603
|
+
<div className="flex flex-col items-center gap-4">
|
|
604
|
+
<span className="text-sm text-white/60">List Content (Light)</span>
|
|
605
|
+
<Tooltip variant="light">
|
|
606
|
+
<TooltipTrigger asChild>
|
|
607
|
+
<Button variant="outline">
|
|
608
|
+
<SearchIcon className="h-4 w-4" />
|
|
609
|
+
</Button>
|
|
610
|
+
</TooltipTrigger>
|
|
611
|
+
<TooltipContent className="max-w-xs" side="left">
|
|
612
|
+
<div className="space-y-2">
|
|
613
|
+
<div className="font-medium">Keyboard Shortcuts</div>
|
|
614
|
+
<ul className="space-y-1 text-xs opacity-80">
|
|
615
|
+
<li>
|
|
616
|
+
• <kbd className="rounded bg-black/10 px-1">Ctrl+C</kbd>{" "}
|
|
617
|
+
Copy
|
|
618
|
+
</li>
|
|
619
|
+
<li>
|
|
620
|
+
• <kbd className="rounded bg-black/10 px-1">Ctrl+V</kbd>{" "}
|
|
621
|
+
Paste
|
|
622
|
+
</li>
|
|
623
|
+
<li>
|
|
624
|
+
• <kbd className="rounded bg-black/10 px-1">Ctrl+Z</kbd>{" "}
|
|
625
|
+
Undo
|
|
626
|
+
</li>
|
|
627
|
+
</ul>
|
|
628
|
+
</div>
|
|
629
|
+
</TooltipContent>
|
|
630
|
+
</Tooltip>
|
|
631
|
+
</div>
|
|
632
|
+
</div>
|
|
633
|
+
</div>
|
|
634
|
+
),
|
|
635
|
+
parameters: {
|
|
636
|
+
docs: {
|
|
637
|
+
description: {
|
|
638
|
+
story:
|
|
639
|
+
"Different content types showing how the gradient backgrounds adapt to various content sizes and complexities. Rich content works well with the sophisticated gradient system.",
|
|
640
|
+
},
|
|
641
|
+
},
|
|
642
|
+
},
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
// 6. Delay Variations
|
|
646
|
+
export const DelayVariations: Story = {
|
|
647
|
+
render: () => (
|
|
648
|
+
<div className="space-y-8 p-8">
|
|
649
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
650
|
+
Delay Variations with TooltipProvider
|
|
651
|
+
</h3>
|
|
652
|
+
|
|
653
|
+
<div className="grid grid-cols-1 gap-6 lg:grid-cols-3">
|
|
654
|
+
{/* No Delay */}
|
|
655
|
+
<div className="flex flex-col items-center gap-4">
|
|
656
|
+
<span className="text-sm text-white/60">No Delay (0ms)</span>
|
|
657
|
+
<TooltipProvider delayDuration={0}>
|
|
658
|
+
<Tooltip variant="dark">
|
|
659
|
+
<TooltipTrigger asChild>
|
|
660
|
+
<Button variant="outline">Instant</Button>
|
|
661
|
+
</TooltipTrigger>
|
|
662
|
+
<TooltipContent side="top">
|
|
663
|
+
<p>Appears immediately</p>
|
|
664
|
+
</TooltipContent>
|
|
665
|
+
</Tooltip>
|
|
666
|
+
</TooltipProvider>
|
|
667
|
+
</div>
|
|
668
|
+
|
|
669
|
+
{/* Medium Delay */}
|
|
670
|
+
<div className="flex flex-col items-center gap-4">
|
|
671
|
+
<span className="text-sm text-white/60">Medium Delay (500ms)</span>
|
|
672
|
+
<TooltipProvider delayDuration={500}>
|
|
673
|
+
<Tooltip variant="light">
|
|
674
|
+
<TooltipTrigger asChild>
|
|
675
|
+
<Button variant="outline">Medium</Button>
|
|
676
|
+
</TooltipTrigger>
|
|
677
|
+
<TooltipContent side="top">
|
|
678
|
+
<p>Appears after 500ms</p>
|
|
679
|
+
</TooltipContent>
|
|
680
|
+
</Tooltip>
|
|
681
|
+
</TooltipProvider>
|
|
682
|
+
</div>
|
|
683
|
+
|
|
684
|
+
{/* Long Delay */}
|
|
685
|
+
<div className="flex flex-col items-center gap-4">
|
|
686
|
+
<span className="text-sm text-white/60">Long Delay (1000ms)</span>
|
|
687
|
+
<TooltipProvider delayDuration={1000}>
|
|
688
|
+
<Tooltip variant="dark">
|
|
689
|
+
<TooltipTrigger asChild>
|
|
690
|
+
<Button variant="outline">Slow</Button>
|
|
691
|
+
</TooltipTrigger>
|
|
692
|
+
<TooltipContent side="top">
|
|
693
|
+
<p>Appears after 1 second</p>
|
|
694
|
+
</TooltipContent>
|
|
695
|
+
</Tooltip>
|
|
696
|
+
</TooltipProvider>
|
|
697
|
+
</div>
|
|
698
|
+
</div>
|
|
699
|
+
|
|
700
|
+
<div className="text-center text-xs text-white/60">
|
|
701
|
+
<p>Hover over each button to experience different delay timings</p>
|
|
702
|
+
</div>
|
|
703
|
+
</div>
|
|
704
|
+
),
|
|
705
|
+
parameters: {
|
|
706
|
+
docs: {
|
|
707
|
+
description: {
|
|
708
|
+
story:
|
|
709
|
+
"Different delay durations configured through TooltipProvider. Useful for controlling when tooltips appear based on user interaction patterns.",
|
|
710
|
+
},
|
|
711
|
+
},
|
|
712
|
+
},
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
// 7. Icon Tooltips Showcase
|
|
716
|
+
export const IconTooltipsShowcase: Story = {
|
|
717
|
+
render: () => (
|
|
718
|
+
<div className="space-y-8 p-8">
|
|
719
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
720
|
+
Icon Tooltips with Gradient Styling
|
|
721
|
+
</h3>
|
|
722
|
+
|
|
723
|
+
<div className="grid grid-cols-2 gap-8 lg:grid-cols-4">
|
|
724
|
+
<div className="flex flex-col items-center gap-4">
|
|
725
|
+
<span className="text-sm text-white/60">Info (Dark)</span>
|
|
726
|
+
<Tooltip variant="dark">
|
|
727
|
+
<TooltipTrigger asChild>
|
|
728
|
+
<button className="rounded-full p-3 transition-colors hover:bg-white/10">
|
|
729
|
+
<AlertIcon className="h-6 w-6 text-blue-400" />
|
|
730
|
+
</button>
|
|
731
|
+
</TooltipTrigger>
|
|
732
|
+
<TooltipContent side="top" align="center">
|
|
733
|
+
<p>Important information available</p>
|
|
734
|
+
</TooltipContent>
|
|
735
|
+
</Tooltip>
|
|
736
|
+
</div>
|
|
737
|
+
|
|
738
|
+
<div className="flex flex-col items-center gap-4">
|
|
739
|
+
<span className="text-sm text-white/60">Search (Light)</span>
|
|
740
|
+
<Tooltip variant="light">
|
|
741
|
+
<TooltipTrigger asChild>
|
|
742
|
+
<button className="rounded-full p-3 transition-colors hover:bg-white/10">
|
|
743
|
+
<SearchIcon className="h-6 w-6 text-green-400" />
|
|
744
|
+
</button>
|
|
745
|
+
</TooltipTrigger>
|
|
746
|
+
<TooltipContent side="top" align="center">
|
|
747
|
+
<p>Search for items</p>
|
|
748
|
+
</TooltipContent>
|
|
749
|
+
</Tooltip>
|
|
750
|
+
</div>
|
|
751
|
+
|
|
752
|
+
<div className="flex flex-col items-center gap-4">
|
|
753
|
+
<span className="text-sm text-white/60">Edit (Dark)</span>
|
|
754
|
+
<Tooltip variant="dark">
|
|
755
|
+
<TooltipTrigger asChild>
|
|
756
|
+
<button className="rounded-full p-3 transition-colors hover:bg-white/10">
|
|
757
|
+
<EditBigIcon className="h-6 w-6 text-purple-400" />
|
|
758
|
+
</button>
|
|
759
|
+
</TooltipTrigger>
|
|
760
|
+
<TooltipContent side="top" align="center">
|
|
761
|
+
<p>Edit this item</p>
|
|
762
|
+
</TooltipContent>
|
|
763
|
+
</Tooltip>
|
|
764
|
+
</div>
|
|
765
|
+
|
|
766
|
+
<div className="flex flex-col items-center gap-4">
|
|
767
|
+
<span className="text-sm text-white/60">Delete (Light)</span>
|
|
768
|
+
<Tooltip variant="light">
|
|
769
|
+
<TooltipTrigger asChild>
|
|
770
|
+
<button className="rounded-full p-3 transition-colors hover:bg-white/10">
|
|
771
|
+
<TrashIcon className="h-6 w-6 text-red-400" />
|
|
772
|
+
</button>
|
|
773
|
+
</TooltipTrigger>
|
|
774
|
+
<TooltipContent side="top" align="center">
|
|
775
|
+
<p>Delete this item</p>
|
|
776
|
+
</TooltipContent>
|
|
777
|
+
</Tooltip>
|
|
778
|
+
</div>
|
|
779
|
+
</div>
|
|
780
|
+
</div>
|
|
781
|
+
),
|
|
782
|
+
parameters: {
|
|
783
|
+
docs: {
|
|
784
|
+
description: {
|
|
785
|
+
story:
|
|
786
|
+
"Common icon buttons with descriptive tooltips. Perfect for toolbar buttons, status indicators, and action triggers.",
|
|
787
|
+
},
|
|
788
|
+
},
|
|
789
|
+
},
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
// 8. Advanced Toolbar Example
|
|
793
|
+
export const AdvancedToolbarExample: Story = {
|
|
794
|
+
render: () => (
|
|
795
|
+
<div className="space-y-8 p-8">
|
|
796
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
797
|
+
Advanced Toolbar with Mixed Variants & Positioning
|
|
798
|
+
</h3>
|
|
799
|
+
|
|
800
|
+
<div className="flex items-center justify-center">
|
|
801
|
+
<div className="flex items-center gap-1 rounded-lg border border-white/10 bg-white/5 p-2">
|
|
802
|
+
<Tooltip variant="dark">
|
|
803
|
+
<TooltipTrigger asChild>
|
|
804
|
+
<button className="rounded p-2 transition-colors hover:bg-white/10">
|
|
805
|
+
<EditBigIcon className="h-5 w-5 text-white/70" />
|
|
806
|
+
</button>
|
|
807
|
+
</TooltipTrigger>
|
|
808
|
+
<TooltipContent side="top" align="start">
|
|
809
|
+
<div className="space-y-1">
|
|
810
|
+
<p>Edit</p>
|
|
811
|
+
<p className="text-xs text-white/60">Ctrl+E</p>
|
|
812
|
+
</div>
|
|
813
|
+
</TooltipContent>
|
|
814
|
+
</Tooltip>
|
|
815
|
+
|
|
816
|
+
<Tooltip variant="light">
|
|
817
|
+
<TooltipTrigger asChild>
|
|
818
|
+
<button className="rounded p-2 transition-colors hover:bg-white/10">
|
|
819
|
+
<SearchIcon className="h-5 w-5 text-white/70" />
|
|
820
|
+
</button>
|
|
821
|
+
</TooltipTrigger>
|
|
822
|
+
<TooltipContent side="top" align="center">
|
|
823
|
+
<div className="space-y-1">
|
|
824
|
+
<p>Search</p>
|
|
825
|
+
<p className="text-xs opacity-70">Ctrl+F</p>
|
|
826
|
+
</div>
|
|
827
|
+
</TooltipContent>
|
|
828
|
+
</Tooltip>
|
|
829
|
+
|
|
830
|
+
<Tooltip variant="dark">
|
|
831
|
+
<TooltipTrigger asChild>
|
|
832
|
+
<button className="rounded p-2 transition-colors hover:bg-white/10">
|
|
833
|
+
<PlusIcon className="h-5 w-5 text-white/70" />
|
|
834
|
+
</button>
|
|
835
|
+
</TooltipTrigger>
|
|
836
|
+
<TooltipContent side="top" align="center">
|
|
837
|
+
<div className="space-y-1">
|
|
838
|
+
<p>Add New</p>
|
|
839
|
+
<p className="text-xs text-white/60">Ctrl+N</p>
|
|
840
|
+
</div>
|
|
841
|
+
</TooltipContent>
|
|
842
|
+
</Tooltip>
|
|
843
|
+
|
|
844
|
+
<Tooltip variant="light">
|
|
845
|
+
<TooltipTrigger asChild>
|
|
846
|
+
<button className="rounded p-2 transition-colors hover:bg-white/10">
|
|
847
|
+
<FileChartIcon className="h-5 w-5 text-white/70" />
|
|
848
|
+
</button>
|
|
849
|
+
</TooltipTrigger>
|
|
850
|
+
<TooltipContent side="top" align="center">
|
|
851
|
+
<div className="space-y-1">
|
|
852
|
+
<p>Generate Report</p>
|
|
853
|
+
<p className="text-xs opacity-70">Ctrl+R</p>
|
|
854
|
+
</div>
|
|
855
|
+
</TooltipContent>
|
|
856
|
+
</Tooltip>
|
|
857
|
+
|
|
858
|
+
<Tooltip variant="dark">
|
|
859
|
+
<TooltipTrigger asChild>
|
|
860
|
+
<button className="rounded p-2 transition-colors hover:bg-white/10">
|
|
861
|
+
<TrashIcon className="h-5 w-5 text-white/70" />
|
|
862
|
+
</button>
|
|
863
|
+
</TooltipTrigger>
|
|
864
|
+
<TooltipContent side="top" align="end">
|
|
865
|
+
<div className="space-y-1">
|
|
866
|
+
<p>Delete</p>
|
|
867
|
+
<p className="text-xs text-white/60">Del</p>
|
|
868
|
+
</div>
|
|
869
|
+
</TooltipContent>
|
|
870
|
+
</Tooltip>
|
|
871
|
+
</div>
|
|
872
|
+
</div>
|
|
873
|
+
|
|
874
|
+
<div className="text-center text-xs text-white/60">
|
|
875
|
+
<p>
|
|
876
|
+
Each tooltip uses different variants and alignments for demonstration
|
|
877
|
+
</p>
|
|
878
|
+
</div>
|
|
879
|
+
</div>
|
|
880
|
+
),
|
|
881
|
+
parameters: {
|
|
882
|
+
docs: {
|
|
883
|
+
description: {
|
|
884
|
+
story:
|
|
885
|
+
"Realistic toolbar implementation showing mixed variants and different alignments. Notice how start/center/end alignments work with the toolbar layout.",
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
},
|
|
889
|
+
}
|
|
890
|
+
|
|
891
|
+
// 9. Interactive States
|
|
892
|
+
export const InteractiveStates: Story = {
|
|
893
|
+
render: () => {
|
|
894
|
+
const [showPassword, setShowPassword] = React.useState(false)
|
|
895
|
+
const [isCompleted, setIsCompleted] = React.useState(false)
|
|
896
|
+
|
|
897
|
+
return (
|
|
898
|
+
<div className="space-y-8 p-8">
|
|
899
|
+
<h3 className="text-center text-lg font-medium text-white">
|
|
900
|
+
Interactive States with Dynamic Variants
|
|
901
|
+
</h3>
|
|
902
|
+
|
|
903
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
904
|
+
{/* Stateful Tooltips */}
|
|
905
|
+
<div className="space-y-4">
|
|
906
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
907
|
+
State-Based Variants
|
|
908
|
+
</h4>
|
|
909
|
+
<div className="flex gap-4">
|
|
910
|
+
<Tooltip variant={showPassword ? "light" : "dark"}>
|
|
911
|
+
<TooltipTrigger asChild>
|
|
912
|
+
<button
|
|
913
|
+
className="rounded-full p-3 transition-colors hover:bg-white/10"
|
|
914
|
+
onClick={() => setShowPassword(!showPassword)}
|
|
915
|
+
>
|
|
916
|
+
{showPassword ? (
|
|
917
|
+
<EyeCloseIcon className="h-6 w-6 text-blue-400" />
|
|
918
|
+
) : (
|
|
919
|
+
<EyeOpenIcon className="h-6 w-6 text-white/50" />
|
|
920
|
+
)}
|
|
921
|
+
</button>
|
|
922
|
+
</TooltipTrigger>
|
|
923
|
+
<TooltipContent side="bottom" align="center">
|
|
924
|
+
<p>{showPassword ? "Hide password" : "Show password"}</p>
|
|
925
|
+
</TooltipContent>
|
|
926
|
+
</Tooltip>
|
|
927
|
+
|
|
928
|
+
<Tooltip variant={isCompleted ? "light" : "dark"}>
|
|
929
|
+
<TooltipTrigger asChild>
|
|
930
|
+
<button
|
|
931
|
+
className="rounded-full p-3 transition-colors hover:bg-white/10"
|
|
932
|
+
onClick={() => setIsCompleted(!isCompleted)}
|
|
933
|
+
>
|
|
934
|
+
<TickCircleIcon
|
|
935
|
+
className={`h-6 w-6 ${isCompleted ? "text-green-400" : "text-white/50"}`}
|
|
936
|
+
/>
|
|
937
|
+
</button>
|
|
938
|
+
</TooltipTrigger>
|
|
939
|
+
<TooltipContent side="bottom" align="center">
|
|
940
|
+
<p>
|
|
941
|
+
{isCompleted ? "Mark as incomplete" : "Mark as complete"}
|
|
942
|
+
</p>
|
|
943
|
+
</TooltipContent>
|
|
944
|
+
</Tooltip>
|
|
945
|
+
</div>
|
|
946
|
+
<div className="text-xs text-white/60">
|
|
947
|
+
<p>Tooltip variants change based on component state</p>
|
|
948
|
+
</div>
|
|
949
|
+
</div>
|
|
950
|
+
|
|
951
|
+
{/* Complex Content */}
|
|
952
|
+
<div className="space-y-4">
|
|
953
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
954
|
+
Complex Content Example
|
|
955
|
+
</h4>
|
|
956
|
+
<Tooltip variant="light">
|
|
957
|
+
<TooltipTrigger asChild>
|
|
958
|
+
<Button variant="outline" className="w-full">
|
|
959
|
+
Copy API Key
|
|
960
|
+
</Button>
|
|
961
|
+
</TooltipTrigger>
|
|
962
|
+
<TooltipContent side="left" className="max-w-sm">
|
|
963
|
+
<div className="space-y-2">
|
|
964
|
+
<div className="font-medium">API Key Management</div>
|
|
965
|
+
<div className="text-xs opacity-70">
|
|
966
|
+
Click to copy your API key to clipboard
|
|
967
|
+
</div>
|
|
968
|
+
<div className="text-xs opacity-60">
|
|
969
|
+
Shortcut: Ctrl+Shift+C
|
|
970
|
+
</div>
|
|
971
|
+
</div>
|
|
972
|
+
</TooltipContent>
|
|
973
|
+
</Tooltip>
|
|
974
|
+
<div className="text-xs text-white/60">
|
|
975
|
+
<p>Complex tooltip content with gradient backgrounds</p>
|
|
976
|
+
</div>
|
|
977
|
+
</div>
|
|
978
|
+
</div>
|
|
979
|
+
</div>
|
|
980
|
+
)
|
|
981
|
+
},
|
|
982
|
+
parameters: {
|
|
983
|
+
docs: {
|
|
984
|
+
description: {
|
|
985
|
+
story:
|
|
986
|
+
"Interactive examples showing dynamic variant changes based on state and complex tooltip content with rich information.",
|
|
987
|
+
},
|
|
988
|
+
},
|
|
989
|
+
},
|
|
990
|
+
}
|
|
991
|
+
|
|
992
|
+
// 10. Complete Showcase
|
|
993
|
+
export const CompleteShowcase: Story = {
|
|
994
|
+
render: () => (
|
|
995
|
+
<div className="space-y-12 p-8">
|
|
996
|
+
<h3 className="text-center text-xl font-medium text-white">
|
|
997
|
+
Complete Tooltip System Showcase
|
|
998
|
+
</h3>
|
|
999
|
+
|
|
1000
|
+
{/* Status Indicators */}
|
|
1001
|
+
<div className="space-y-4">
|
|
1002
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
1003
|
+
Status Indicators with Positioning
|
|
1004
|
+
</h4>
|
|
1005
|
+
<div className="flex gap-6">
|
|
1006
|
+
<div className="flex items-center gap-2">
|
|
1007
|
+
<Tooltip variant="dark">
|
|
1008
|
+
<TooltipTrigger asChild>
|
|
1009
|
+
<div className="h-3 w-3 cursor-help rounded-full bg-green-500"></div>
|
|
1010
|
+
</TooltipTrigger>
|
|
1011
|
+
<TooltipContent side="top" align="start">
|
|
1012
|
+
<div className="space-y-1">
|
|
1013
|
+
<div className="font-medium text-white">Online</div>
|
|
1014
|
+
<div className="text-xs text-white/80">
|
|
1015
|
+
Last seen: Just now
|
|
1016
|
+
</div>
|
|
1017
|
+
</div>
|
|
1018
|
+
</TooltipContent>
|
|
1019
|
+
</Tooltip>
|
|
1020
|
+
<span className="text-sm text-white">Active User</span>
|
|
1021
|
+
</div>
|
|
1022
|
+
|
|
1023
|
+
<div className="flex items-center gap-2">
|
|
1024
|
+
<Tooltip variant="light">
|
|
1025
|
+
<TooltipTrigger asChild>
|
|
1026
|
+
<div className="h-3 w-3 cursor-help rounded-full bg-yellow-500"></div>
|
|
1027
|
+
</TooltipTrigger>
|
|
1028
|
+
<TooltipContent side="top" align="center">
|
|
1029
|
+
<div className="space-y-1">
|
|
1030
|
+
<div className="font-medium">Away</div>
|
|
1031
|
+
<div className="text-xs opacity-70">
|
|
1032
|
+
Last seen: 5 minutes ago
|
|
1033
|
+
</div>
|
|
1034
|
+
</div>
|
|
1035
|
+
</TooltipContent>
|
|
1036
|
+
</Tooltip>
|
|
1037
|
+
<span className="text-sm text-white">Away User</span>
|
|
1038
|
+
</div>
|
|
1039
|
+
|
|
1040
|
+
<div className="flex items-center gap-2">
|
|
1041
|
+
<Tooltip variant="dark">
|
|
1042
|
+
<TooltipTrigger asChild>
|
|
1043
|
+
<div className="h-3 w-3 cursor-help rounded-full bg-gray-500"></div>
|
|
1044
|
+
</TooltipTrigger>
|
|
1045
|
+
<TooltipContent side="top" align="end">
|
|
1046
|
+
<div className="space-y-1">
|
|
1047
|
+
<div className="font-medium text-white">Offline</div>
|
|
1048
|
+
<div className="text-xs text-white/80">
|
|
1049
|
+
Last seen: 2 hours ago
|
|
1050
|
+
</div>
|
|
1051
|
+
</div>
|
|
1052
|
+
</TooltipContent>
|
|
1053
|
+
</Tooltip>
|
|
1054
|
+
<span className="text-sm text-white">Offline User</span>
|
|
1055
|
+
</div>
|
|
1056
|
+
</div>
|
|
1057
|
+
</div>
|
|
1058
|
+
|
|
1059
|
+
{/* Data Metrics */}
|
|
1060
|
+
<div className="space-y-4">
|
|
1061
|
+
<h4 className="text-sm font-medium text-white/70">
|
|
1062
|
+
Data Metrics with Various Positioning
|
|
1063
|
+
</h4>
|
|
1064
|
+
<div className="grid grid-cols-2 gap-4 lg:grid-cols-4">
|
|
1065
|
+
{[
|
|
1066
|
+
{
|
|
1067
|
+
value: "1,234",
|
|
1068
|
+
label: "Users",
|
|
1069
|
+
change: "+12%",
|
|
1070
|
+
period: "vs last month",
|
|
1071
|
+
variant: "dark" as const,
|
|
1072
|
+
side: "top" as const,
|
|
1073
|
+
align: "start" as const,
|
|
1074
|
+
},
|
|
1075
|
+
{
|
|
1076
|
+
value: "$56.7k",
|
|
1077
|
+
label: "Revenue",
|
|
1078
|
+
change: "+8%",
|
|
1079
|
+
period: "vs last month",
|
|
1080
|
+
variant: "light" as const,
|
|
1081
|
+
side: "top" as const,
|
|
1082
|
+
align: "center" as const,
|
|
1083
|
+
},
|
|
1084
|
+
{
|
|
1085
|
+
value: "89.2%",
|
|
1086
|
+
label: "Uptime",
|
|
1087
|
+
change: "-0.3%",
|
|
1088
|
+
period: "vs last month",
|
|
1089
|
+
variant: "dark" as const,
|
|
1090
|
+
side: "bottom" as const,
|
|
1091
|
+
align: "center" as const,
|
|
1092
|
+
},
|
|
1093
|
+
{
|
|
1094
|
+
value: "42ms",
|
|
1095
|
+
label: "Response",
|
|
1096
|
+
change: "-15%",
|
|
1097
|
+
period: "vs last month",
|
|
1098
|
+
variant: "light" as const,
|
|
1099
|
+
side: "bottom" as const,
|
|
1100
|
+
align: "end" as const,
|
|
1101
|
+
},
|
|
1102
|
+
].map((metric, index) => (
|
|
1103
|
+
<Tooltip key={index} variant={metric.variant}>
|
|
1104
|
+
<TooltipTrigger asChild>
|
|
1105
|
+
<div className="cursor-help rounded-lg border border-white/10 bg-white/5 p-4 transition-colors hover:bg-white/10">
|
|
1106
|
+
<div className="text-2xl font-bold text-white">
|
|
1107
|
+
{metric.value}
|
|
1108
|
+
</div>
|
|
1109
|
+
<div className="text-sm text-white/70">{metric.label}</div>
|
|
1110
|
+
</div>
|
|
1111
|
+
</TooltipTrigger>
|
|
1112
|
+
<TooltipContent side={metric.side} align={metric.align}>
|
|
1113
|
+
<div className="space-y-1">
|
|
1114
|
+
<div className="font-medium">{metric.label} Details</div>
|
|
1115
|
+
<div className="text-xs">
|
|
1116
|
+
<span
|
|
1117
|
+
className={
|
|
1118
|
+
metric.change.startsWith("+")
|
|
1119
|
+
? metric.variant === "dark"
|
|
1120
|
+
? "text-green-400"
|
|
1121
|
+
: "text-green-600"
|
|
1122
|
+
: metric.variant === "dark"
|
|
1123
|
+
? "text-red-400"
|
|
1124
|
+
: "text-red-600"
|
|
1125
|
+
}
|
|
1126
|
+
>
|
|
1127
|
+
{metric.change}
|
|
1128
|
+
</span>
|
|
1129
|
+
<span
|
|
1130
|
+
className={
|
|
1131
|
+
metric.variant === "dark"
|
|
1132
|
+
? "text-white/60"
|
|
1133
|
+
: "opacity-70"
|
|
1134
|
+
}
|
|
1135
|
+
>
|
|
1136
|
+
{" "}
|
|
1137
|
+
{metric.period}
|
|
1138
|
+
</span>
|
|
1139
|
+
</div>
|
|
1140
|
+
</div>
|
|
1141
|
+
</TooltipContent>
|
|
1142
|
+
</Tooltip>
|
|
1143
|
+
))}
|
|
1144
|
+
</div>
|
|
1145
|
+
</div>
|
|
1146
|
+
|
|
1147
|
+
<div className="space-y-1 text-center text-xs text-white/60">
|
|
1148
|
+
<p>
|
|
1149
|
+
Complete demonstration of the tooltip system with gradient backgrounds
|
|
1150
|
+
</p>
|
|
1151
|
+
<p>
|
|
1152
|
+
Each tooltip uses different positioning and variants for optimal UX
|
|
1153
|
+
</p>
|
|
1154
|
+
<p>
|
|
1155
|
+
Notice how gradients are positioned to create visual connection points
|
|
1156
|
+
</p>
|
|
1157
|
+
</div>
|
|
1158
|
+
</div>
|
|
1159
|
+
),
|
|
1160
|
+
parameters: {
|
|
1161
|
+
layout: "fullscreen",
|
|
1162
|
+
docs: {
|
|
1163
|
+
description: {
|
|
1164
|
+
story:
|
|
1165
|
+
"Complete showcase demonstrating the full capability of the tooltip system with all positioning combinations, gradient backgrounds, and real-world usage patterns.",
|
|
1166
|
+
},
|
|
1167
|
+
},
|
|
1168
|
+
},
|
|
1169
|
+
}
|
|
1170
|
+
|
|
1171
|
+
// 11. Complete Matrix Example - All Combinations
|
|
1172
|
+
export const AllCombinationsMatrix: Story = {
|
|
1173
|
+
render: () => (
|
|
1174
|
+
<div className="min-h-screen space-y-16 p-12">
|
|
1175
|
+
<h3 className="text-center text-2xl font-bold text-white">
|
|
1176
|
+
Complete Tooltip Matrix - All Combinations
|
|
1177
|
+
</h3>
|
|
1178
|
+
<p className="text-center text-white/70">
|
|
1179
|
+
Every possible combination of side, align, and variant
|
|
1180
|
+
</p>
|
|
1181
|
+
|
|
1182
|
+
{/* Dark Variant - All Combinations */}
|
|
1183
|
+
<div className="space-y-8">
|
|
1184
|
+
<h4 className="text-center text-xl font-semibold text-purple-300">
|
|
1185
|
+
Dark Variant - All Sides & Alignments
|
|
1186
|
+
</h4>
|
|
1187
|
+
|
|
1188
|
+
{/* Top Side - Dark */}
|
|
1189
|
+
<div className="space-y-4">
|
|
1190
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1191
|
+
Top Side (Dark)
|
|
1192
|
+
</h5>
|
|
1193
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
1194
|
+
<div className="flex flex-col items-center gap-4">
|
|
1195
|
+
<span className="text-sm text-white/60">
|
|
1196
|
+
side="top" align="start"
|
|
1197
|
+
</span>
|
|
1198
|
+
<Tooltip variant="dark">
|
|
1199
|
+
<TooltipTrigger asChild>
|
|
1200
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1201
|
+
Top Start
|
|
1202
|
+
</div>
|
|
1203
|
+
</TooltipTrigger>
|
|
1204
|
+
<TooltipContent side="top" align="start" sideOffset={8}>
|
|
1205
|
+
<p>Dark variant, top side, start alignment</p>
|
|
1206
|
+
</TooltipContent>
|
|
1207
|
+
</Tooltip>
|
|
1208
|
+
</div>
|
|
1209
|
+
|
|
1210
|
+
<div className="flex flex-col items-center gap-4">
|
|
1211
|
+
<span className="text-sm text-white/60">
|
|
1212
|
+
side="top" align="center"
|
|
1213
|
+
</span>
|
|
1214
|
+
<Tooltip variant="dark">
|
|
1215
|
+
<TooltipTrigger asChild>
|
|
1216
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1217
|
+
Top Center
|
|
1218
|
+
</div>
|
|
1219
|
+
</TooltipTrigger>
|
|
1220
|
+
<TooltipContent side="top" align="center" sideOffset={8}>
|
|
1221
|
+
<p>Dark variant, top side, center alignment</p>
|
|
1222
|
+
</TooltipContent>
|
|
1223
|
+
</Tooltip>
|
|
1224
|
+
</div>
|
|
1225
|
+
|
|
1226
|
+
<div className="flex flex-col items-center gap-4">
|
|
1227
|
+
<span className="text-sm text-white/60">
|
|
1228
|
+
side="top" align="end"
|
|
1229
|
+
</span>
|
|
1230
|
+
<Tooltip variant="dark">
|
|
1231
|
+
<TooltipTrigger asChild>
|
|
1232
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1233
|
+
Top End
|
|
1234
|
+
</div>
|
|
1235
|
+
</TooltipTrigger>
|
|
1236
|
+
<TooltipContent side="top" align="end" sideOffset={8}>
|
|
1237
|
+
<p>Dark variant, top side, end alignment</p>
|
|
1238
|
+
</TooltipContent>
|
|
1239
|
+
</Tooltip>
|
|
1240
|
+
</div>
|
|
1241
|
+
</div>
|
|
1242
|
+
</div>
|
|
1243
|
+
|
|
1244
|
+
{/* Right & Left Side - Dark */}
|
|
1245
|
+
<div className="space-y-4">
|
|
1246
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1247
|
+
Right & Left Sides (Dark)
|
|
1248
|
+
</h5>
|
|
1249
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
1250
|
+
<div className="flex flex-col items-center gap-4">
|
|
1251
|
+
<span className="text-sm text-white/60">side="right"</span>
|
|
1252
|
+
<Tooltip variant="dark">
|
|
1253
|
+
<TooltipTrigger asChild>
|
|
1254
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1255
|
+
Right Side
|
|
1256
|
+
</div>
|
|
1257
|
+
</TooltipTrigger>
|
|
1258
|
+
<TooltipContent side="right" sideOffset={8}>
|
|
1259
|
+
<p>Dark variant, right side positioning</p>
|
|
1260
|
+
</TooltipContent>
|
|
1261
|
+
</Tooltip>
|
|
1262
|
+
</div>
|
|
1263
|
+
|
|
1264
|
+
<div className="flex flex-col items-center gap-4">
|
|
1265
|
+
<span className="text-sm text-white/60">side="left"</span>
|
|
1266
|
+
<Tooltip variant="dark">
|
|
1267
|
+
<TooltipTrigger asChild>
|
|
1268
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1269
|
+
Left Side
|
|
1270
|
+
</div>
|
|
1271
|
+
</TooltipTrigger>
|
|
1272
|
+
<TooltipContent side="left" sideOffset={8}>
|
|
1273
|
+
<p>Dark variant, left side positioning</p>
|
|
1274
|
+
</TooltipContent>
|
|
1275
|
+
</Tooltip>
|
|
1276
|
+
</div>
|
|
1277
|
+
</div>
|
|
1278
|
+
</div>
|
|
1279
|
+
|
|
1280
|
+
{/* Bottom Side - Dark */}
|
|
1281
|
+
<div className="space-y-4">
|
|
1282
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1283
|
+
Bottom Side (Dark)
|
|
1284
|
+
</h5>
|
|
1285
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
1286
|
+
<div className="flex flex-col items-center gap-4">
|
|
1287
|
+
<span className="text-sm text-white/60">
|
|
1288
|
+
side="bottom" align="start"
|
|
1289
|
+
</span>
|
|
1290
|
+
<Tooltip variant="dark">
|
|
1291
|
+
<TooltipTrigger asChild>
|
|
1292
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1293
|
+
Bottom Start
|
|
1294
|
+
</div>
|
|
1295
|
+
</TooltipTrigger>
|
|
1296
|
+
<TooltipContent side="bottom" align="start" sideOffset={8}>
|
|
1297
|
+
<p>Dark variant, bottom side, start alignment</p>
|
|
1298
|
+
</TooltipContent>
|
|
1299
|
+
</Tooltip>
|
|
1300
|
+
</div>
|
|
1301
|
+
|
|
1302
|
+
<div className="flex flex-col items-center gap-4">
|
|
1303
|
+
<span className="text-sm text-white/60">
|
|
1304
|
+
side="bottom" align="center"
|
|
1305
|
+
</span>
|
|
1306
|
+
<Tooltip variant="dark">
|
|
1307
|
+
<TooltipTrigger asChild>
|
|
1308
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1309
|
+
Bottom Center
|
|
1310
|
+
</div>
|
|
1311
|
+
</TooltipTrigger>
|
|
1312
|
+
<TooltipContent side="bottom" align="center" sideOffset={8}>
|
|
1313
|
+
<p>Dark variant, bottom side, center alignment</p>
|
|
1314
|
+
</TooltipContent>
|
|
1315
|
+
</Tooltip>
|
|
1316
|
+
</div>
|
|
1317
|
+
|
|
1318
|
+
<div className="flex flex-col items-center gap-4">
|
|
1319
|
+
<span className="text-sm text-white/60">
|
|
1320
|
+
side="bottom" align="end"
|
|
1321
|
+
</span>
|
|
1322
|
+
<Tooltip variant="dark">
|
|
1323
|
+
<TooltipTrigger asChild>
|
|
1324
|
+
<div className="rounded-lg border border-purple-500/30 bg-purple-900/20 px-6 py-3 text-white">
|
|
1325
|
+
Bottom End
|
|
1326
|
+
</div>
|
|
1327
|
+
</TooltipTrigger>
|
|
1328
|
+
<TooltipContent side="bottom" align="end" sideOffset={8}>
|
|
1329
|
+
<p>Dark variant, bottom side, end alignment</p>
|
|
1330
|
+
</TooltipContent>
|
|
1331
|
+
</Tooltip>
|
|
1332
|
+
</div>
|
|
1333
|
+
</div>
|
|
1334
|
+
</div>
|
|
1335
|
+
</div>
|
|
1336
|
+
|
|
1337
|
+
{/* Light Variant - All Combinations */}
|
|
1338
|
+
<div className="space-y-8">
|
|
1339
|
+
<h4 className="text-center text-xl font-semibold text-purple-300">
|
|
1340
|
+
Light Variant - All Sides & Alignments
|
|
1341
|
+
</h4>
|
|
1342
|
+
|
|
1343
|
+
{/* Top Side - Light */}
|
|
1344
|
+
<div className="space-y-4">
|
|
1345
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1346
|
+
Top Side (Light)
|
|
1347
|
+
</h5>
|
|
1348
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
1349
|
+
<div className="flex flex-col items-center gap-4">
|
|
1350
|
+
<span className="text-sm text-white/60">
|
|
1351
|
+
side="top" align="start"
|
|
1352
|
+
</span>
|
|
1353
|
+
<Tooltip variant="light">
|
|
1354
|
+
<TooltipTrigger asChild>
|
|
1355
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1356
|
+
Top Start
|
|
1357
|
+
</div>
|
|
1358
|
+
</TooltipTrigger>
|
|
1359
|
+
<TooltipContent side="top" align="start" sideOffset={8}>
|
|
1360
|
+
<p>Light variant, top side, start alignment</p>
|
|
1361
|
+
</TooltipContent>
|
|
1362
|
+
</Tooltip>
|
|
1363
|
+
</div>
|
|
1364
|
+
|
|
1365
|
+
<div className="flex flex-col items-center gap-4">
|
|
1366
|
+
<span className="text-sm text-white/60">
|
|
1367
|
+
side="top" align="center"
|
|
1368
|
+
</span>
|
|
1369
|
+
<Tooltip variant="light">
|
|
1370
|
+
<TooltipTrigger asChild>
|
|
1371
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1372
|
+
Top Center
|
|
1373
|
+
</div>
|
|
1374
|
+
</TooltipTrigger>
|
|
1375
|
+
<TooltipContent side="top" align="center" sideOffset={8}>
|
|
1376
|
+
<p>Light variant, top side, center alignment</p>
|
|
1377
|
+
</TooltipContent>
|
|
1378
|
+
</Tooltip>
|
|
1379
|
+
</div>
|
|
1380
|
+
|
|
1381
|
+
<div className="flex flex-col items-center gap-4">
|
|
1382
|
+
<span className="text-sm text-white/60">
|
|
1383
|
+
side="top" align="end"
|
|
1384
|
+
</span>
|
|
1385
|
+
<Tooltip variant="light">
|
|
1386
|
+
<TooltipTrigger asChild>
|
|
1387
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1388
|
+
Top End
|
|
1389
|
+
</div>
|
|
1390
|
+
</TooltipTrigger>
|
|
1391
|
+
<TooltipContent side="top" align="end" sideOffset={8}>
|
|
1392
|
+
<p>Light variant, top side, end alignment</p>
|
|
1393
|
+
</TooltipContent>
|
|
1394
|
+
</Tooltip>
|
|
1395
|
+
</div>
|
|
1396
|
+
</div>
|
|
1397
|
+
</div>
|
|
1398
|
+
|
|
1399
|
+
{/* Right & Left Side - Light */}
|
|
1400
|
+
<div className="space-y-4">
|
|
1401
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1402
|
+
Right & Left Sides (Light)
|
|
1403
|
+
</h5>
|
|
1404
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-2">
|
|
1405
|
+
<div className="flex flex-col items-center gap-4">
|
|
1406
|
+
<span className="text-sm text-white/60">side="right"</span>
|
|
1407
|
+
<Tooltip variant="light">
|
|
1408
|
+
<TooltipTrigger asChild>
|
|
1409
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1410
|
+
Right Side
|
|
1411
|
+
</div>
|
|
1412
|
+
</TooltipTrigger>
|
|
1413
|
+
<TooltipContent side="right" sideOffset={8}>
|
|
1414
|
+
<p>Light variant, right side positioning</p>
|
|
1415
|
+
</TooltipContent>
|
|
1416
|
+
</Tooltip>
|
|
1417
|
+
</div>
|
|
1418
|
+
|
|
1419
|
+
<div className="flex flex-col items-center gap-4">
|
|
1420
|
+
<span className="text-sm text-white/60">side="left"</span>
|
|
1421
|
+
<Tooltip variant="light">
|
|
1422
|
+
<TooltipTrigger asChild>
|
|
1423
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1424
|
+
Left Side
|
|
1425
|
+
</div>
|
|
1426
|
+
</TooltipTrigger>
|
|
1427
|
+
<TooltipContent side="left" sideOffset={8}>
|
|
1428
|
+
<p>Light variant, left side positioning</p>
|
|
1429
|
+
</TooltipContent>
|
|
1430
|
+
</Tooltip>
|
|
1431
|
+
</div>
|
|
1432
|
+
</div>
|
|
1433
|
+
</div>
|
|
1434
|
+
|
|
1435
|
+
{/* Bottom Side - Light */}
|
|
1436
|
+
<div className="space-y-4">
|
|
1437
|
+
<h5 className="text-center text-lg font-medium text-white/80">
|
|
1438
|
+
Bottom Side (Light)
|
|
1439
|
+
</h5>
|
|
1440
|
+
<div className="grid grid-cols-1 gap-8 lg:grid-cols-3">
|
|
1441
|
+
<div className="flex flex-col items-center gap-4">
|
|
1442
|
+
<span className="text-sm text-white/60">
|
|
1443
|
+
side="bottom" align="start"
|
|
1444
|
+
</span>
|
|
1445
|
+
<Tooltip variant="light">
|
|
1446
|
+
<TooltipTrigger asChild>
|
|
1447
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1448
|
+
Bottom Start
|
|
1449
|
+
</div>
|
|
1450
|
+
</TooltipTrigger>
|
|
1451
|
+
<TooltipContent side="bottom" align="start" sideOffset={8}>
|
|
1452
|
+
<p>Light variant, bottom side, start alignment</p>
|
|
1453
|
+
</TooltipContent>
|
|
1454
|
+
</Tooltip>
|
|
1455
|
+
</div>
|
|
1456
|
+
|
|
1457
|
+
<div className="flex flex-col items-center gap-4">
|
|
1458
|
+
<span className="text-sm text-white/60">
|
|
1459
|
+
side="bottom" align="center"
|
|
1460
|
+
</span>
|
|
1461
|
+
<Tooltip variant="light">
|
|
1462
|
+
<TooltipTrigger asChild>
|
|
1463
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1464
|
+
Bottom Center
|
|
1465
|
+
</div>
|
|
1466
|
+
</TooltipTrigger>
|
|
1467
|
+
<TooltipContent side="bottom" align="center" sideOffset={8}>
|
|
1468
|
+
<p>Light variant, bottom side, center alignment</p>
|
|
1469
|
+
</TooltipContent>
|
|
1470
|
+
</Tooltip>
|
|
1471
|
+
</div>
|
|
1472
|
+
|
|
1473
|
+
<div className="flex flex-col items-center gap-4">
|
|
1474
|
+
<span className="text-sm text-white/60">
|
|
1475
|
+
side="bottom" align="end"
|
|
1476
|
+
</span>
|
|
1477
|
+
<Tooltip variant="light">
|
|
1478
|
+
<TooltipTrigger asChild>
|
|
1479
|
+
<div className="rounded-lg border border-purple-300/50 bg-purple-100/10 px-6 py-3 text-white">
|
|
1480
|
+
Bottom End
|
|
1481
|
+
</div>
|
|
1482
|
+
</TooltipTrigger>
|
|
1483
|
+
<TooltipContent side="bottom" align="end" sideOffset={8}>
|
|
1484
|
+
<p>Light variant, bottom side, end alignment</p>
|
|
1485
|
+
</TooltipContent>
|
|
1486
|
+
</Tooltip>
|
|
1487
|
+
</div>
|
|
1488
|
+
</div>
|
|
1489
|
+
</div>
|
|
1490
|
+
</div>
|
|
1491
|
+
|
|
1492
|
+
{/* Code Example */}
|
|
1493
|
+
<div className="mx-auto max-w-4xl space-y-4 rounded-lg border border-white/10 bg-black/20 p-6">
|
|
1494
|
+
<h5 className="text-lg font-medium text-white">Code Examples</h5>
|
|
1495
|
+
<div className="space-y-4 text-sm">
|
|
1496
|
+
<div className="space-y-2">
|
|
1497
|
+
<p className="text-white/70">Dark variant with top positioning:</p>
|
|
1498
|
+
<pre className="overflow-x-auto rounded bg-black/40 p-3 text-purple-300">
|
|
1499
|
+
{`<Tooltip variant="dark">
|
|
1500
|
+
<TooltipTrigger>Trigger Element</TooltipTrigger>
|
|
1501
|
+
<TooltipContent side="top" align="center" sideOffset={8}>
|
|
1502
|
+
Tooltip content
|
|
1503
|
+
</TooltipContent>
|
|
1504
|
+
</Tooltip>`}
|
|
1505
|
+
</pre>
|
|
1506
|
+
</div>
|
|
1507
|
+
<div className="space-y-2">
|
|
1508
|
+
<p className="text-white/70">
|
|
1509
|
+
Light variant with right positioning:
|
|
1510
|
+
</p>
|
|
1511
|
+
<pre className="overflow-x-auto rounded bg-black/40 p-3 text-purple-300">
|
|
1512
|
+
{`<Tooltip variant="light">
|
|
1513
|
+
<TooltipTrigger>Trigger Element</TooltipTrigger>
|
|
1514
|
+
<TooltipContent side="right" sideOffset={12}>
|
|
1515
|
+
Tooltip content
|
|
1516
|
+
</TooltipContent>
|
|
1517
|
+
</Tooltip>`}
|
|
1518
|
+
</pre>
|
|
1519
|
+
</div>
|
|
1520
|
+
</div>
|
|
1521
|
+
</div>
|
|
1522
|
+
|
|
1523
|
+
<div className="space-y-2 text-center text-sm text-white/60">
|
|
1524
|
+
<p>
|
|
1525
|
+
<strong>16 total combinations:</strong> 2 variants × 8 positioning
|
|
1526
|
+
combinations
|
|
1527
|
+
</p>
|
|
1528
|
+
<p>
|
|
1529
|
+
Each combination has unique gradient backgrounds optimized for that
|
|
1530
|
+
specific position
|
|
1531
|
+
</p>
|
|
1532
|
+
<p>
|
|
1533
|
+
Notice how the light variant uses more complex multi-layer gradients
|
|
1534
|
+
for sophisticated styling
|
|
1535
|
+
</p>
|
|
1536
|
+
</div>
|
|
1537
|
+
</div>
|
|
1538
|
+
),
|
|
1539
|
+
parameters: {
|
|
1540
|
+
layout: "fullscreen",
|
|
1541
|
+
docs: {
|
|
1542
|
+
description: {
|
|
1543
|
+
story:
|
|
1544
|
+
"Complete matrix showing all 16 possible combinations: 2 variants (dark/light) × 4 sides × 2-3 alignments each. Each combination demonstrates unique gradient styling optimized for that specific positioning.",
|
|
1545
|
+
},
|
|
1546
|
+
},
|
|
1547
|
+
},
|
|
1548
|
+
}
|