@shipfox/react-ui 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +20 -10
- package/.storybook/preview.tsx +1 -1
- package/.storybook/vitest.setup.ts +4 -0
- package/.turbo/turbo-build.log +2 -2
- package/.turbo/turbo-check.log +2 -2
- package/.turbo/turbo-type.log +1 -1
- package/CHANGELOG.md +18 -0
- package/README.md +40 -1
- package/argos.config.ts +33 -0
- package/dist/components/alert/alert.d.ts +2 -2
- package/dist/components/alert/alert.js +3 -3
- package/dist/components/alert/alert.js.map +1 -1
- package/dist/components/alert/alert.stories.js +2 -2
- package/dist/components/alert/alert.stories.js.map +1 -1
- package/dist/components/avatar/avatar-group.js +3 -3
- package/dist/components/avatar/avatar-group.js.map +1 -1
- package/dist/components/avatar/avatar.d.ts +4 -1
- package/dist/components/avatar/avatar.d.ts.map +1 -1
- package/dist/components/avatar/avatar.js +7 -8
- package/dist/components/avatar/avatar.js.map +1 -1
- package/dist/components/avatar/avatar.stories.js +15 -3
- package/dist/components/avatar/avatar.stories.js.map +1 -1
- package/dist/components/badge/badge.d.ts +48 -0
- package/dist/components/badge/badge.d.ts.map +1 -0
- package/dist/components/badge/badge.js +72 -0
- package/dist/components/badge/badge.js.map +1 -0
- package/dist/components/badge/badge.stories.js +802 -0
- package/dist/components/badge/badge.stories.js.map +1 -0
- package/dist/components/badge/icon-badge.d.ts +9 -0
- package/dist/components/badge/icon-badge.d.ts.map +1 -0
- package/dist/components/badge/icon-badge.js +32 -0
- package/dist/components/badge/icon-badge.js.map +1 -0
- package/dist/components/badge/index.d.ts +5 -0
- package/dist/components/badge/index.d.ts.map +1 -0
- package/dist/components/badge/index.js +6 -0
- package/dist/components/badge/index.js.map +1 -0
- package/dist/components/badge/status-badge.d.ts +9 -0
- package/dist/components/badge/status-badge.d.ts.map +1 -0
- package/dist/components/badge/status-badge.js +29 -0
- package/dist/components/badge/status-badge.js.map +1 -0
- package/dist/components/badge/user-badge.d.ts +8 -0
- package/dist/components/badge/user-badge.d.ts.map +1 -0
- package/dist/components/badge/user-badge.js +24 -0
- package/dist/components/badge/user-badge.js.map +1 -0
- package/dist/components/button/button-link.d.ts +14 -0
- package/dist/components/button/button-link.d.ts.map +1 -0
- package/dist/components/button/button-link.js +63 -0
- package/dist/components/button/button-link.js.map +1 -0
- package/dist/components/button/button-link.stories.js +127 -0
- package/dist/components/button/button-link.stories.js.map +1 -0
- package/dist/components/{button.d.ts → button/button.d.ts} +2 -2
- package/dist/components/button/button.d.ts.map +1 -0
- package/dist/components/{button.js → button/button.js} +9 -8
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/{button.stories.js → button/button.stories.js} +2 -14
- package/dist/components/button/button.stories.js.map +1 -0
- package/dist/components/button/icon-button.d.ts +14 -0
- package/dist/components/button/icon-button.d.ts.map +1 -0
- package/dist/components/button/icon-button.js +53 -0
- package/dist/components/button/icon-button.js.map +1 -0
- package/dist/components/button/icon-button.stories.js +254 -0
- package/dist/components/button/icon-button.stories.js.map +1 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.d.ts.map +1 -0
- package/dist/components/button/index.js +5 -0
- package/dist/components/button/index.js.map +1 -0
- package/dist/components/checkbox/checkbox-label.d.ts +14 -0
- package/dist/components/checkbox/checkbox-label.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox-label.js +82 -0
- package/dist/components/checkbox/checkbox-label.js.map +1 -0
- package/dist/components/checkbox/checkbox-links.d.ts +18 -0
- package/dist/components/checkbox/checkbox-links.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox-links.js +58 -0
- package/dist/components/checkbox/checkbox-links.js.map +1 -0
- package/dist/components/checkbox/checkbox.d.ts +9 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +49 -0
- package/dist/components/checkbox/checkbox.js.map +1 -0
- package/dist/components/checkbox/checkbox.stories.js +566 -0
- package/dist/components/checkbox/checkbox.stories.js.map +1 -0
- package/dist/components/checkbox/index.d.ts +4 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +5 -0
- package/dist/components/checkbox/index.js.map +1 -0
- package/dist/components/code-block/code-block-footer.d.ts +26 -0
- package/dist/components/code-block/code-block-footer.d.ts.map +1 -0
- package/dist/components/code-block/code-block-footer.js +86 -0
- package/dist/components/code-block/code-block-footer.js.map +1 -0
- package/dist/components/code-block/code-block.d.ts +50 -0
- package/dist/components/code-block/code-block.d.ts.map +1 -0
- package/dist/components/code-block/code-block.js +142 -0
- package/dist/components/code-block/code-block.js.map +1 -0
- package/dist/components/code-block/code-block.stories.js +341 -0
- package/dist/components/code-block/code-block.stories.js.map +1 -0
- package/dist/components/code-block/code-content.d.ts +11 -0
- package/dist/components/code-block/code-content.d.ts.map +1 -0
- package/dist/components/code-block/code-content.js +29 -0
- package/dist/components/code-block/code-content.js.map +1 -0
- package/dist/components/code-block/code-copy-button.d.ts +11 -0
- package/dist/components/code-block/code-copy-button.d.ts.map +1 -0
- package/dist/components/code-block/code-copy-button.js +49 -0
- package/dist/components/code-block/code-copy-button.js.map +1 -0
- package/dist/components/code-block/code-tabs.d.ts +16 -0
- package/dist/components/code-block/code-tabs.d.ts.map +1 -0
- package/dist/components/code-block/code-tabs.js +98 -0
- package/dist/components/code-block/code-tabs.js.map +1 -0
- package/dist/components/code-block/index.d.ts +4 -0
- package/dist/components/code-block/index.d.ts.map +1 -0
- package/dist/components/code-block/index.js +5 -0
- package/dist/components/code-block/index.js.map +1 -0
- package/dist/components/dynamic-item/dynamic-item.d.ts +13 -0
- package/dist/components/dynamic-item/dynamic-item.d.ts.map +1 -0
- package/dist/components/dynamic-item/dynamic-item.js +43 -0
- package/dist/components/dynamic-item/dynamic-item.js.map +1 -0
- package/dist/components/dynamic-item/dynamic-item.stories.js +375 -0
- package/dist/components/dynamic-item/dynamic-item.stories.js.map +1 -0
- package/dist/components/dynamic-item/index.d.ts +2 -0
- package/dist/components/dynamic-item/index.d.ts.map +1 -0
- package/dist/components/dynamic-item/index.js +3 -0
- package/dist/components/dynamic-item/index.js.map +1 -0
- package/dist/components/icon/custom/index.d.ts +2 -0
- package/dist/components/icon/custom/index.d.ts.map +1 -1
- package/dist/components/icon/custom/index.js +2 -0
- package/dist/components/icon/custom/index.js.map +1 -1
- package/dist/components/icon/custom/slack-logo.d.ts +6 -0
- package/dist/components/icon/custom/slack-logo.d.ts.map +1 -0
- package/dist/components/icon/custom/slack-logo.js +34 -0
- package/dist/components/icon/custom/slack-logo.js.map +1 -0
- package/dist/components/icon/custom/stripe-logo.d.ts +8 -0
- package/dist/components/icon/custom/stripe-logo.d.ts.map +1 -0
- package/dist/components/icon/custom/stripe-logo.js +24 -0
- package/dist/components/icon/custom/stripe-logo.js.map +1 -0
- package/dist/components/icon/icon.d.ts +13 -2
- package/dist/components/icon/icon.d.ts.map +1 -1
- package/dist/components/icon/icon.js +14 -3
- package/dist/components/icon/icon.js.map +1 -1
- package/dist/components/icon/icon.stories.js +6 -3
- package/dist/components/icon/icon.stories.js.map +1 -1
- package/dist/components/index.d.ts +9 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +10 -2
- package/dist/components/index.js.map +1 -1
- package/dist/components/inline-tips/inline-tips.d.ts +1 -1
- package/dist/components/inline-tips/inline-tips.d.ts.map +1 -1
- package/dist/components/inline-tips/inline-tips.js +1 -1
- package/dist/components/inline-tips/inline-tips.js.map +1 -1
- package/dist/components/inline-tips/inline-tips.stories.js +5 -5
- package/dist/components/inline-tips/inline-tips.stories.js.map +1 -1
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +3 -0
- package/dist/components/input/index.js.map +1 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/{input.js → input/input.js} +2 -2
- package/dist/components/input/input.js.map +1 -0
- package/dist/components/{input.stories.js → input/input.stories.js} +1 -1
- package/dist/components/input/input.stories.js.map +1 -0
- package/dist/components/item/index.d.ts +2 -0
- package/dist/components/item/index.d.ts.map +1 -0
- package/dist/components/item/index.js +3 -0
- package/dist/components/item/index.js.map +1 -0
- package/dist/components/item/item.d.ts +32 -0
- package/dist/components/item/item.d.ts.map +1 -0
- package/dist/components/item/item.js +120 -0
- package/dist/components/item/item.js.map +1 -0
- package/dist/components/item/item.stories.js +232 -0
- package/dist/components/item/item.stories.js.map +1 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.d.ts.map +1 -0
- package/dist/components/label/index.js +3 -0
- package/dist/components/label/index.js.map +1 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/label/label.js +13 -0
- package/dist/components/label/label.js.map +1 -0
- package/dist/components/label/label.stories.js +105 -0
- package/dist/components/label/label.stories.js.map +1 -0
- package/dist/components/moving-border/moving-border.d.ts +9 -0
- package/dist/components/moving-border/moving-border.d.ts.map +1 -0
- package/dist/components/moving-border/moving-border.js +54 -0
- package/dist/components/moving-border/moving-border.js.map +1 -0
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textarea/textarea.js.map +1 -1
- package/dist/components/theme/index.d.ts +2 -0
- package/dist/components/theme/index.d.ts.map +1 -0
- package/dist/components/theme/index.js +3 -0
- package/dist/components/theme/index.js.map +1 -0
- package/dist/components/{theme-provider.d.ts → theme/theme-provider.d.ts} +1 -1
- package/dist/components/theme/theme-provider.d.ts.map +1 -0
- package/dist/components/{theme-provider.js → theme/theme-provider.js} +1 -1
- package/dist/components/theme/theme-provider.js.map +1 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.d.ts.map +1 -0
- package/dist/components/toast/index.js +4 -0
- package/dist/components/toast/index.js.map +1 -0
- package/dist/components/toast/toast-custom.d.ts +19 -0
- package/dist/components/toast/toast-custom.d.ts.map +1 -0
- package/dist/components/toast/toast-custom.js +134 -0
- package/dist/components/toast/toast-custom.js.map +1 -0
- package/dist/components/toast/toast.d.ts +5 -0
- package/dist/components/toast/toast.d.ts.map +1 -0
- package/dist/components/toast/toast.js +40 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toast/toast.stories.js +326 -0
- package/dist/components/toast/toast.stories.js.map +1 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +3 -0
- package/dist/components/tooltip/index.js.map +1 -0
- package/dist/components/tooltip/tooltip.d.ts +18 -5
- package/dist/components/tooltip/tooltip.d.ts.map +1 -1
- package/dist/components/tooltip/tooltip.js +63 -3
- package/dist/components/tooltip/tooltip.js.map +1 -1
- package/dist/components/tooltip/tooltip.stories.js +560 -0
- package/dist/components/tooltip/tooltip.stories.js.map +1 -0
- package/dist/hooks/index.d.ts +3 -0
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -0
- package/dist/hooks/index.js.map +1 -1
- package/dist/hooks/useResolvedTheme.d.ts +2 -0
- package/dist/hooks/useResolvedTheme.d.ts.map +1 -0
- package/dist/hooks/useResolvedTheme.js +24 -0
- package/dist/hooks/useResolvedTheme.js.map +1 -0
- package/dist/hooks/useShikiHighlight.d.ts +28 -0
- package/dist/hooks/useShikiHighlight.d.ts.map +1 -0
- package/dist/hooks/useShikiHighlight.js +106 -0
- package/dist/hooks/useShikiHighlight.js.map +1 -0
- package/dist/hooks/useShikiStyleInjection.d.ts +2 -0
- package/dist/hooks/useShikiStyleInjection.d.ts.map +1 -0
- package/dist/hooks/useShikiStyleInjection.js +34 -0
- package/dist/hooks/useShikiStyleInjection.js.map +1 -0
- package/dist/onboarding/sign-in.stories.js +93 -0
- package/dist/onboarding/sign-in.stories.js.map +1 -0
- package/index.css +130 -12
- package/package.json +14 -3
- package/src/assets/illustration-1.svg +92 -0
- package/src/assets/illustration-2.svg +14 -0
- package/src/assets/illustration-gradient.svg +7049 -0
- package/src/components/alert/alert.stories.tsx +2 -2
- package/src/components/alert/alert.tsx +3 -3
- package/src/components/avatar/avatar-group.tsx +3 -3
- package/src/components/avatar/avatar.stories.tsx +9 -2
- package/src/components/avatar/avatar.tsx +10 -6
- package/src/components/badge/badge.stories.tsx +468 -0
- package/src/components/badge/badge.tsx +147 -0
- package/src/components/badge/icon-badge.tsx +43 -0
- package/src/components/badge/index.ts +4 -0
- package/src/components/badge/status-badge.tsx +43 -0
- package/src/components/badge/user-badge.tsx +34 -0
- package/src/components/button/button-link.stories.tsx +86 -0
- package/src/components/button/button-link.tsx +76 -0
- package/src/components/{button.stories.tsx → button/button.stories.tsx} +1 -7
- package/src/components/{button.tsx → button/button.tsx} +9 -7
- package/src/components/button/icon-button.stories.tsx +182 -0
- package/src/components/button/icon-button.tsx +69 -0
- package/src/components/button/index.ts +3 -0
- package/src/components/checkbox/checkbox-label.tsx +125 -0
- package/src/components/checkbox/checkbox-links.tsx +90 -0
- package/src/components/checkbox/checkbox.stories.tsx +375 -0
- package/src/components/checkbox/checkbox.tsx +71 -0
- package/src/components/checkbox/index.ts +3 -0
- package/src/components/code-block/code-block-footer.tsx +173 -0
- package/src/components/code-block/code-block.stories.tsx +323 -0
- package/src/components/code-block/code-block.tsx +283 -0
- package/src/components/code-block/code-content.tsx +63 -0
- package/src/components/code-block/code-copy-button.tsx +73 -0
- package/src/components/code-block/code-tabs.tsx +170 -0
- package/src/components/code-block/index.ts +3 -0
- package/src/components/dynamic-item/dynamic-item.stories.tsx +261 -0
- package/src/components/dynamic-item/dynamic-item.tsx +68 -0
- package/src/components/dynamic-item/index.ts +1 -0
- package/src/components/icon/custom/index.ts +2 -0
- package/src/components/icon/custom/slack-logo.tsx +35 -0
- package/src/components/icon/custom/stripe-logo.tsx +27 -0
- package/src/components/icon/icon.stories.tsx +3 -1
- package/src/components/icon/icon.tsx +23 -1
- package/src/components/index.ts +9 -1
- package/src/components/inline-tips/inline-tips.stories.tsx +3 -3
- package/src/components/inline-tips/inline-tips.tsx +2 -2
- package/src/components/input/index.ts +1 -0
- package/src/components/{input.tsx → input/input.tsx} +1 -1
- package/src/components/item/index.ts +1 -0
- package/src/components/item/item.stories.tsx +150 -0
- package/src/components/item/item.tsx +182 -0
- package/src/components/label/index.ts +1 -0
- package/src/components/label/label.stories.tsx +67 -0
- package/src/components/label/label.tsx +15 -0
- package/src/components/moving-border/moving-border.tsx +67 -0
- package/src/components/textarea/textarea.tsx +1 -1
- package/src/components/theme/index.ts +1 -0
- package/src/components/toast/index.ts +2 -0
- package/src/components/toast/toast-custom.tsx +154 -0
- package/src/components/toast/toast.stories.tsx +369 -0
- package/src/components/toast/toast.tsx +41 -0
- package/src/components/tooltip/index.ts +1 -0
- package/src/components/tooltip/tooltip.stories.tsx +284 -0
- package/src/components/tooltip/tooltip.tsx +79 -10
- package/src/hooks/index.ts +3 -0
- package/src/hooks/useResolvedTheme.ts +34 -0
- package/src/hooks/useShikiHighlight.ts +140 -0
- package/src/hooks/useShikiStyleInjection.ts +34 -0
- package/src/onboarding/sign-in.stories.tsx +73 -0
- package/vitest.config.ts +30 -3
- package/dist/components/button.d.ts.map +0 -1
- package/dist/components/button.js.map +0 -1
- package/dist/components/button.stories.js.map +0 -1
- package/dist/components/input.d.ts.map +0 -1
- package/dist/components/input.js.map +0 -1
- package/dist/components/input.stories.js.map +0 -1
- package/dist/components/theme-provider.d.ts.map +0 -1
- package/dist/components/theme-provider.js.map +0 -1
- /package/dist/components/{input.d.ts → input/input.d.ts} +0 -0
- /package/src/components/{input.stories.tsx → input/input.stories.tsx} +0 -0
- /package/src/components/{theme-provider.tsx → theme/theme-provider.tsx} +0 -0
|
@@ -0,0 +1,369 @@
|
|
|
1
|
+
import type {Meta, StoryObj} from '@storybook/react';
|
|
2
|
+
import {Button} from 'components/button/button';
|
|
3
|
+
import {Code} from 'components/typography';
|
|
4
|
+
import {Toaster, toast} from './toast';
|
|
5
|
+
import {ToastCustom} from './toast-custom';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Components/Toast',
|
|
9
|
+
component: Toaster,
|
|
10
|
+
tags: ['autodocs'],
|
|
11
|
+
parameters: {
|
|
12
|
+
layout: 'centered',
|
|
13
|
+
},
|
|
14
|
+
decorators: [
|
|
15
|
+
(Story) => (
|
|
16
|
+
<>
|
|
17
|
+
<Story />
|
|
18
|
+
<div className="flex flex-wrap justify-center items-center gap-32">
|
|
19
|
+
{/* Regular Toasts */}
|
|
20
|
+
<div className="flex flex-col gap-8">
|
|
21
|
+
<Code variant="label" className="text-foreground-neutral-subtle text-center">
|
|
22
|
+
REGULAR TOASTS
|
|
23
|
+
</Code>
|
|
24
|
+
<Button
|
|
25
|
+
onClick={() => {
|
|
26
|
+
toast('Event has been created');
|
|
27
|
+
}}
|
|
28
|
+
>
|
|
29
|
+
Default Toast
|
|
30
|
+
</Button>
|
|
31
|
+
<Button
|
|
32
|
+
onClick={() => {
|
|
33
|
+
toast.success('Success! Your changes have been saved.');
|
|
34
|
+
}}
|
|
35
|
+
>
|
|
36
|
+
Success Toast
|
|
37
|
+
</Button>
|
|
38
|
+
<Button
|
|
39
|
+
onClick={() => {
|
|
40
|
+
toast.error('Error! Something went wrong.');
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
Error Toast
|
|
44
|
+
</Button>
|
|
45
|
+
<Button
|
|
46
|
+
onClick={() => {
|
|
47
|
+
toast.warning('Warning! Please review your input.');
|
|
48
|
+
}}
|
|
49
|
+
>
|
|
50
|
+
Warning Toast
|
|
51
|
+
</Button>
|
|
52
|
+
<Button
|
|
53
|
+
onClick={() => {
|
|
54
|
+
toast.info('Info: This is an informational message.');
|
|
55
|
+
}}
|
|
56
|
+
>
|
|
57
|
+
Info Toast
|
|
58
|
+
</Button>
|
|
59
|
+
<Button
|
|
60
|
+
onClick={() => {
|
|
61
|
+
toast('Event has been created', {
|
|
62
|
+
description: 'Sunday, December 03, 2023 at 9:00 AM',
|
|
63
|
+
});
|
|
64
|
+
}}
|
|
65
|
+
>
|
|
66
|
+
Toast with Description
|
|
67
|
+
</Button>
|
|
68
|
+
<Button
|
|
69
|
+
onClick={() => {
|
|
70
|
+
toast('Event has been created', {
|
|
71
|
+
description: 'Sunday, December 03, 2023 at 9:00 AM',
|
|
72
|
+
action: {
|
|
73
|
+
label: 'Undo',
|
|
74
|
+
onClick: () => {
|
|
75
|
+
toast('Undo clicked');
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
});
|
|
79
|
+
}}
|
|
80
|
+
>
|
|
81
|
+
Toast with Action
|
|
82
|
+
</Button>
|
|
83
|
+
<Button
|
|
84
|
+
onClick={() => {
|
|
85
|
+
const promise = new Promise((resolve) => {
|
|
86
|
+
setTimeout(() => {
|
|
87
|
+
resolve({name: 'Sonner'});
|
|
88
|
+
}, 2000);
|
|
89
|
+
});
|
|
90
|
+
|
|
91
|
+
toast.promise(promise, {
|
|
92
|
+
loading: 'Loading...',
|
|
93
|
+
success: (data) => {
|
|
94
|
+
return `${(data as {name: string}).name} toast has been added`;
|
|
95
|
+
},
|
|
96
|
+
error: 'Error',
|
|
97
|
+
});
|
|
98
|
+
}}
|
|
99
|
+
>
|
|
100
|
+
Promise Toast
|
|
101
|
+
</Button>
|
|
102
|
+
</div>
|
|
103
|
+
{/* Custom Toasts */}
|
|
104
|
+
<div className="flex flex-col gap-8 text-center">
|
|
105
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
106
|
+
CUSTOM TOASTS
|
|
107
|
+
</Code>
|
|
108
|
+
<Button
|
|
109
|
+
onClick={() => {
|
|
110
|
+
toast.custom(
|
|
111
|
+
(t) => (
|
|
112
|
+
<ToastCustom
|
|
113
|
+
variant="success"
|
|
114
|
+
title="Insert your alert title here"
|
|
115
|
+
description="Insert the alert description here. It would look better as two lines of text."
|
|
116
|
+
actions={[
|
|
117
|
+
{
|
|
118
|
+
label: 'Upgrade',
|
|
119
|
+
onClick: () => {
|
|
120
|
+
toast('Upgrade clicked');
|
|
121
|
+
toast.dismiss(t);
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: 'Learn more',
|
|
126
|
+
onClick: () => {
|
|
127
|
+
toast('Learn more clicked');
|
|
128
|
+
toast.dismiss(t);
|
|
129
|
+
},
|
|
130
|
+
},
|
|
131
|
+
]}
|
|
132
|
+
onClose={() => toast.dismiss(t)}
|
|
133
|
+
/>
|
|
134
|
+
),
|
|
135
|
+
{
|
|
136
|
+
duration: Infinity,
|
|
137
|
+
},
|
|
138
|
+
);
|
|
139
|
+
}}
|
|
140
|
+
>
|
|
141
|
+
Custom Toast (Success - Full)
|
|
142
|
+
</Button>
|
|
143
|
+
<Button
|
|
144
|
+
onClick={() => {
|
|
145
|
+
toast.custom(
|
|
146
|
+
(t) => (
|
|
147
|
+
<ToastCustom
|
|
148
|
+
variant="info"
|
|
149
|
+
title="Insert your alert title here"
|
|
150
|
+
description="Insert the alert description here. It would look better as two lines of text."
|
|
151
|
+
actions={[
|
|
152
|
+
{
|
|
153
|
+
label: 'Upgrade',
|
|
154
|
+
onClick: () => {
|
|
155
|
+
toast('Upgrade clicked');
|
|
156
|
+
toast.dismiss(t);
|
|
157
|
+
},
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
label: 'Learn more',
|
|
161
|
+
onClick: () => {
|
|
162
|
+
toast('Learn more clicked');
|
|
163
|
+
toast.dismiss(t);
|
|
164
|
+
},
|
|
165
|
+
},
|
|
166
|
+
]}
|
|
167
|
+
onClose={() => toast.dismiss(t)}
|
|
168
|
+
/>
|
|
169
|
+
),
|
|
170
|
+
{
|
|
171
|
+
duration: Infinity,
|
|
172
|
+
},
|
|
173
|
+
);
|
|
174
|
+
}}
|
|
175
|
+
>
|
|
176
|
+
Custom Toast (Info - Full)
|
|
177
|
+
</Button>
|
|
178
|
+
<Button
|
|
179
|
+
onClick={() => {
|
|
180
|
+
toast.custom(
|
|
181
|
+
(t) => (
|
|
182
|
+
<ToastCustom
|
|
183
|
+
variant="warning"
|
|
184
|
+
title="Insert your alert title here"
|
|
185
|
+
description="Insert the alert description here. It would look better as two lines of text."
|
|
186
|
+
actions={[
|
|
187
|
+
{
|
|
188
|
+
label: 'Upgrade',
|
|
189
|
+
onClick: () => {
|
|
190
|
+
toast('Upgrade clicked');
|
|
191
|
+
toast.dismiss(t);
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: 'Learn more',
|
|
196
|
+
onClick: () => {
|
|
197
|
+
toast('Learn more clicked');
|
|
198
|
+
toast.dismiss(t);
|
|
199
|
+
},
|
|
200
|
+
},
|
|
201
|
+
]}
|
|
202
|
+
onClose={() => toast.dismiss(t)}
|
|
203
|
+
/>
|
|
204
|
+
),
|
|
205
|
+
{
|
|
206
|
+
duration: Infinity,
|
|
207
|
+
},
|
|
208
|
+
);
|
|
209
|
+
}}
|
|
210
|
+
>
|
|
211
|
+
Custom Toast (Warning - Full)
|
|
212
|
+
</Button>
|
|
213
|
+
<Button
|
|
214
|
+
onClick={() => {
|
|
215
|
+
toast.custom(
|
|
216
|
+
(t) => (
|
|
217
|
+
<ToastCustom
|
|
218
|
+
variant="error"
|
|
219
|
+
title="Insert your alert title here"
|
|
220
|
+
description="Insert the alert description here. It would look better as two lines of text."
|
|
221
|
+
actions={[
|
|
222
|
+
{
|
|
223
|
+
label: 'Upgrade',
|
|
224
|
+
onClick: () => {
|
|
225
|
+
toast('Upgrade clicked');
|
|
226
|
+
toast.dismiss(t);
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
label: 'Learn more',
|
|
231
|
+
onClick: () => {
|
|
232
|
+
toast('Learn more clicked');
|
|
233
|
+
toast.dismiss(t);
|
|
234
|
+
},
|
|
235
|
+
},
|
|
236
|
+
]}
|
|
237
|
+
onClose={() => toast.dismiss(t)}
|
|
238
|
+
/>
|
|
239
|
+
),
|
|
240
|
+
{
|
|
241
|
+
duration: Infinity,
|
|
242
|
+
},
|
|
243
|
+
);
|
|
244
|
+
}}
|
|
245
|
+
>
|
|
246
|
+
Custom Toast (Error - Full)
|
|
247
|
+
</Button>
|
|
248
|
+
<Button
|
|
249
|
+
onClick={() => {
|
|
250
|
+
toast.custom(
|
|
251
|
+
(t) => (
|
|
252
|
+
<ToastCustom
|
|
253
|
+
variant="success"
|
|
254
|
+
content="Insert your alert content here"
|
|
255
|
+
actions={[
|
|
256
|
+
{
|
|
257
|
+
label: 'Learn more',
|
|
258
|
+
onClick: () => {
|
|
259
|
+
toast('Learn more clicked');
|
|
260
|
+
toast.dismiss(t);
|
|
261
|
+
},
|
|
262
|
+
},
|
|
263
|
+
]}
|
|
264
|
+
onClose={() => toast.dismiss(t)}
|
|
265
|
+
/>
|
|
266
|
+
),
|
|
267
|
+
{
|
|
268
|
+
duration: Infinity,
|
|
269
|
+
},
|
|
270
|
+
);
|
|
271
|
+
}}
|
|
272
|
+
>
|
|
273
|
+
Custom Toast (Success - Simple)
|
|
274
|
+
</Button>
|
|
275
|
+
<Button
|
|
276
|
+
onClick={() => {
|
|
277
|
+
toast.custom(
|
|
278
|
+
(t) => (
|
|
279
|
+
<ToastCustom
|
|
280
|
+
variant="info"
|
|
281
|
+
content="Insert your alert content here"
|
|
282
|
+
actions={[
|
|
283
|
+
{
|
|
284
|
+
label: 'Learn more',
|
|
285
|
+
onClick: () => {
|
|
286
|
+
toast('Learn more clicked');
|
|
287
|
+
toast.dismiss(t);
|
|
288
|
+
},
|
|
289
|
+
},
|
|
290
|
+
]}
|
|
291
|
+
onClose={() => toast.dismiss(t)}
|
|
292
|
+
/>
|
|
293
|
+
),
|
|
294
|
+
{
|
|
295
|
+
duration: Infinity,
|
|
296
|
+
},
|
|
297
|
+
);
|
|
298
|
+
}}
|
|
299
|
+
>
|
|
300
|
+
Custom Toast (Info - Simple)
|
|
301
|
+
</Button>
|
|
302
|
+
<Button
|
|
303
|
+
onClick={() => {
|
|
304
|
+
toast.custom(
|
|
305
|
+
(t) => (
|
|
306
|
+
<ToastCustom
|
|
307
|
+
variant="warning"
|
|
308
|
+
content="Insert your alert content here"
|
|
309
|
+
actions={[
|
|
310
|
+
{
|
|
311
|
+
label: 'Learn more',
|
|
312
|
+
onClick: () => {
|
|
313
|
+
toast('Learn more clicked');
|
|
314
|
+
toast.dismiss(t);
|
|
315
|
+
},
|
|
316
|
+
},
|
|
317
|
+
]}
|
|
318
|
+
onClose={() => toast.dismiss(t)}
|
|
319
|
+
/>
|
|
320
|
+
),
|
|
321
|
+
{
|
|
322
|
+
duration: Infinity,
|
|
323
|
+
},
|
|
324
|
+
);
|
|
325
|
+
}}
|
|
326
|
+
>
|
|
327
|
+
Custom Toast (Warning - Simple)
|
|
328
|
+
</Button>
|
|
329
|
+
<Button
|
|
330
|
+
onClick={() => {
|
|
331
|
+
toast.custom(
|
|
332
|
+
(t) => (
|
|
333
|
+
<ToastCustom
|
|
334
|
+
variant="error"
|
|
335
|
+
content="Insert your alert content here"
|
|
336
|
+
actions={[
|
|
337
|
+
{
|
|
338
|
+
label: 'Learn more',
|
|
339
|
+
onClick: () => {
|
|
340
|
+
toast('Learn more clicked');
|
|
341
|
+
toast.dismiss(t);
|
|
342
|
+
},
|
|
343
|
+
},
|
|
344
|
+
]}
|
|
345
|
+
onClose={() => toast.dismiss(t)}
|
|
346
|
+
/>
|
|
347
|
+
),
|
|
348
|
+
{
|
|
349
|
+
duration: Infinity,
|
|
350
|
+
},
|
|
351
|
+
);
|
|
352
|
+
}}
|
|
353
|
+
>
|
|
354
|
+
Custom Toast (Error - Simple)
|
|
355
|
+
</Button>
|
|
356
|
+
</div>
|
|
357
|
+
</div>
|
|
358
|
+
</>
|
|
359
|
+
),
|
|
360
|
+
],
|
|
361
|
+
} satisfies Meta<typeof Toaster>;
|
|
362
|
+
|
|
363
|
+
export default meta;
|
|
364
|
+
|
|
365
|
+
type Story = StoryObj<typeof meta>;
|
|
366
|
+
|
|
367
|
+
export const Default: Story = {
|
|
368
|
+
render: () => <Toaster position="top-center" />,
|
|
369
|
+
};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import {useTheme} from 'hooks/useTheme';
|
|
2
|
+
import {AlertTriangle, CheckCircle2, Info, Loader2, XCircle} from 'lucide-react';
|
|
3
|
+
import {
|
|
4
|
+
Toaster as SonnerToaster,
|
|
5
|
+
type ToasterProps as SonnerToasterProps,
|
|
6
|
+
toast as sonnerToast,
|
|
7
|
+
} from 'sonner';
|
|
8
|
+
|
|
9
|
+
type ToasterProps = Omit<SonnerToasterProps, 'theme'>;
|
|
10
|
+
|
|
11
|
+
function Toaster({...props}: ToasterProps) {
|
|
12
|
+
const {theme} = useTheme();
|
|
13
|
+
|
|
14
|
+
return (
|
|
15
|
+
<SonnerToaster
|
|
16
|
+
theme={theme as SonnerToasterProps['theme']}
|
|
17
|
+
className="toaster group"
|
|
18
|
+
toastOptions={{
|
|
19
|
+
classNames: {
|
|
20
|
+
toast:
|
|
21
|
+
'group toast group-[.toaster]:bg-background-components-base group-[.toaster]:text-foreground-neutral-base group-[.toaster]:border group-[.toaster]:border-border-neutral-base group-[.toaster]:shadow-tooltip rounded-8 p-8',
|
|
22
|
+
description: 'group-[.toast]:text-foreground-neutral-muted text-xs leading-20 mt-4',
|
|
23
|
+
actionButton:
|
|
24
|
+
'group-[.toast]:bg-background-button-neutral-default group-[.toast]:text-foreground-neutral-base group-[.toast]:hover:bg-background-button-neutral-hover rounded-6 px-8 py-4 text-xs font-medium',
|
|
25
|
+
cancelButton:
|
|
26
|
+
'group-[.toast]:bg-background-button-transparent-default group-[.toast]:text-foreground-neutral-base group-[.toast]:hover:bg-background-button-transparent-hover rounded-6 px-8 py-4 text-xs font-medium',
|
|
27
|
+
},
|
|
28
|
+
}}
|
|
29
|
+
icons={{
|
|
30
|
+
success: <CheckCircle2 className="size-20 text-tag-success-icon" />,
|
|
31
|
+
info: <Info className="size-20 text-tag-blue-icon" />,
|
|
32
|
+
warning: <AlertTriangle className="size-20 text-tag-warning-icon" />,
|
|
33
|
+
error: <XCircle className="size-20 text-tag-error-icon" />,
|
|
34
|
+
loading: <Loader2 className="size-20 text-tag-neutral-icon animate-spin" />,
|
|
35
|
+
}}
|
|
36
|
+
{...props}
|
|
37
|
+
/>
|
|
38
|
+
);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export {Toaster, sonnerToast as toast, type ToasterProps};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tooltip';
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
import type {Meta, StoryObj} from '@storybook/react';
|
|
2
|
+
import {Code} from 'components/typography';
|
|
3
|
+
import {Button} from '../button';
|
|
4
|
+
import {Tooltip, TooltipContent, type TooltipContentProps, TooltipTrigger} from './tooltip';
|
|
5
|
+
|
|
6
|
+
type TooltipStoryArgs = {
|
|
7
|
+
defaultOpen?: boolean;
|
|
8
|
+
delayDuration?: number;
|
|
9
|
+
variant?: TooltipContentProps['variant'];
|
|
10
|
+
size?: TooltipContentProps['size'];
|
|
11
|
+
side?: TooltipContentProps['side'];
|
|
12
|
+
align?: TooltipContentProps['align'];
|
|
13
|
+
sideOffset?: TooltipContentProps['sideOffset'];
|
|
14
|
+
animated?: TooltipContentProps['animated'];
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
const meta = {
|
|
18
|
+
title: 'Components/Tooltip',
|
|
19
|
+
component: Tooltip,
|
|
20
|
+
tags: ['autodocs'],
|
|
21
|
+
argTypes: {
|
|
22
|
+
defaultOpen: {control: 'boolean'},
|
|
23
|
+
delayDuration: {control: 'number'},
|
|
24
|
+
variant: {
|
|
25
|
+
control: 'select',
|
|
26
|
+
options: ['default', 'inverted', 'muted'],
|
|
27
|
+
},
|
|
28
|
+
size: {
|
|
29
|
+
control: 'select',
|
|
30
|
+
options: ['sm', 'md', 'lg'],
|
|
31
|
+
},
|
|
32
|
+
side: {
|
|
33
|
+
control: 'select',
|
|
34
|
+
options: ['top', 'bottom', 'left', 'right'],
|
|
35
|
+
},
|
|
36
|
+
align: {
|
|
37
|
+
control: 'select',
|
|
38
|
+
options: ['start', 'center', 'end'],
|
|
39
|
+
},
|
|
40
|
+
sideOffset: {control: 'number'},
|
|
41
|
+
animated: {control: 'boolean'},
|
|
42
|
+
},
|
|
43
|
+
args: {
|
|
44
|
+
defaultOpen: false,
|
|
45
|
+
delayDuration: 0,
|
|
46
|
+
variant: 'default',
|
|
47
|
+
size: 'md',
|
|
48
|
+
side: 'top',
|
|
49
|
+
align: 'center',
|
|
50
|
+
sideOffset: 8,
|
|
51
|
+
animated: true,
|
|
52
|
+
},
|
|
53
|
+
} satisfies Meta<TooltipStoryArgs>;
|
|
54
|
+
|
|
55
|
+
export default meta;
|
|
56
|
+
type Story = StoryObj<typeof meta>;
|
|
57
|
+
|
|
58
|
+
export const Default: Story = {
|
|
59
|
+
args: {
|
|
60
|
+
defaultOpen: false,
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
render: (args: TooltipStoryArgs) => {
|
|
64
|
+
const {defaultOpen, delayDuration, variant, size, side, align, sideOffset, animated} = args;
|
|
65
|
+
return (
|
|
66
|
+
<div className="flex items-center justify-center p-64">
|
|
67
|
+
<Tooltip defaultOpen={defaultOpen} delayDuration={delayDuration}>
|
|
68
|
+
<TooltipTrigger asChild>
|
|
69
|
+
<Button>Hover me</Button>
|
|
70
|
+
</TooltipTrigger>
|
|
71
|
+
<TooltipContent
|
|
72
|
+
variant={variant}
|
|
73
|
+
size={size}
|
|
74
|
+
side={side}
|
|
75
|
+
align={align}
|
|
76
|
+
sideOffset={sideOffset}
|
|
77
|
+
animated={animated}
|
|
78
|
+
>
|
|
79
|
+
Tooltip Text
|
|
80
|
+
</TooltipContent>
|
|
81
|
+
</Tooltip>
|
|
82
|
+
</div>
|
|
83
|
+
);
|
|
84
|
+
},
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const Types: Story = {
|
|
88
|
+
render: () => (
|
|
89
|
+
<div className="flex flex-col gap-64 p-64">
|
|
90
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
91
|
+
TYPES
|
|
92
|
+
</Code>
|
|
93
|
+
<div className="flex flex-col gap-32">
|
|
94
|
+
{/* Text Type */}
|
|
95
|
+
<div className="flex flex-col gap-16">
|
|
96
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
97
|
+
Type=Text
|
|
98
|
+
</Code>
|
|
99
|
+
<div className="flex gap-16">
|
|
100
|
+
<Tooltip>
|
|
101
|
+
<TooltipTrigger asChild>
|
|
102
|
+
<Button variant="primary">Tooltip Text</Button>
|
|
103
|
+
</TooltipTrigger>
|
|
104
|
+
<TooltipContent variant="inverted">Tooltip Text</TooltipContent>
|
|
105
|
+
</Tooltip>
|
|
106
|
+
<Tooltip>
|
|
107
|
+
<TooltipTrigger asChild>
|
|
108
|
+
<Button variant="secondary">Tooltip Text</Button>
|
|
109
|
+
</TooltipTrigger>
|
|
110
|
+
<TooltipContent>Tooltip Text</TooltipContent>
|
|
111
|
+
</Tooltip>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{/* Shortcut Type */}
|
|
116
|
+
<div className="flex flex-col gap-16">
|
|
117
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
118
|
+
Type=Shortcut
|
|
119
|
+
</Code>
|
|
120
|
+
<div className="flex gap-16">
|
|
121
|
+
<Tooltip>
|
|
122
|
+
<TooltipTrigger asChild>
|
|
123
|
+
<Button variant="primary">Tooltip Text</Button>
|
|
124
|
+
</TooltipTrigger>
|
|
125
|
+
<TooltipContent variant="inverted">
|
|
126
|
+
<div className="flex items-center gap-6">
|
|
127
|
+
<span>Tooltip Text</span>
|
|
128
|
+
<div className="flex items-center gap-4">
|
|
129
|
+
<kbd className="flex h-16 w-16 items-center justify-center rounded-4 border border-border-neutral-base bg-background-field-base text-sm text-foreground-neutral-subtle">
|
|
130
|
+
⌘
|
|
131
|
+
</kbd>
|
|
132
|
+
<kbd className="flex h-16 w-16 items-center justify-center rounded-4 border border-border-neutral-base bg-background-field-base text-sm text-foreground-neutral-subtle">
|
|
133
|
+
/
|
|
134
|
+
</kbd>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</TooltipContent>
|
|
138
|
+
</Tooltip>
|
|
139
|
+
<Tooltip>
|
|
140
|
+
<TooltipTrigger asChild>
|
|
141
|
+
<Button variant="secondary">Tooltip Text</Button>
|
|
142
|
+
</TooltipTrigger>
|
|
143
|
+
<TooltipContent>
|
|
144
|
+
<div className="flex items-center gap-6">
|
|
145
|
+
<span>Tooltip Text</span>
|
|
146
|
+
<div className="flex items-center gap-4">
|
|
147
|
+
<kbd className="flex h-16 w-16 items-center justify-center rounded-4 border border-border-neutral-base bg-background-field-base text-xs text-foreground-neutral-subtle">
|
|
148
|
+
⌘
|
|
149
|
+
</kbd>
|
|
150
|
+
<kbd className="flex h-16 w-16 items-center justify-center rounded-4 border border-border-neutral-base bg-background-field-base text-xs text-foreground-neutral-subtle">
|
|
151
|
+
/
|
|
152
|
+
</kbd>
|
|
153
|
+
</div>
|
|
154
|
+
</div>
|
|
155
|
+
</TooltipContent>
|
|
156
|
+
</Tooltip>
|
|
157
|
+
</div>
|
|
158
|
+
</div>
|
|
159
|
+
|
|
160
|
+
{/* Graph Type */}
|
|
161
|
+
<div className="flex flex-col gap-16">
|
|
162
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
163
|
+
Type=Graph
|
|
164
|
+
</Code>
|
|
165
|
+
<div className="flex gap-16">
|
|
166
|
+
<Tooltip>
|
|
167
|
+
<TooltipTrigger asChild>
|
|
168
|
+
<Button variant="primary">Hover for graph data</Button>
|
|
169
|
+
</TooltipTrigger>
|
|
170
|
+
<TooltipContent variant="inverted" className="w-160">
|
|
171
|
+
<div className="flex flex-col gap-4">
|
|
172
|
+
<div className="text-xs text-foreground-neutral-subtle">Jul 22, 2025</div>
|
|
173
|
+
<div className="flex flex-col gap-4">
|
|
174
|
+
<div className="flex items-center justify-between gap-12">
|
|
175
|
+
<div className="flex flex-1 items-center gap-4">
|
|
176
|
+
<div className="size-6 rounded-full bg-purple-500" />
|
|
177
|
+
<span className="text-xs">Data A</span>
|
|
178
|
+
</div>
|
|
179
|
+
<span className="text-xs">$6.14</span>
|
|
180
|
+
</div>
|
|
181
|
+
<div className="flex items-center justify-between gap-12">
|
|
182
|
+
<div className="flex flex-1 items-center gap-4">
|
|
183
|
+
<div className="size-6 rounded-full bg-green-500" />
|
|
184
|
+
<span className="text-xs">Data B</span>
|
|
185
|
+
</div>
|
|
186
|
+
<span className="text-xs">$4.37</span>
|
|
187
|
+
</div>
|
|
188
|
+
<div className="flex items-center justify-between gap-12">
|
|
189
|
+
<div className="flex flex-1 items-center gap-4">
|
|
190
|
+
<div className="size-6 rounded-full bg-orange-500" />
|
|
191
|
+
<span className="text-xs">Data C</span>
|
|
192
|
+
</div>
|
|
193
|
+
<span className="text-xs">$12.88</span>
|
|
194
|
+
</div>
|
|
195
|
+
<div className="flex items-center justify-between gap-12">
|
|
196
|
+
<div className="flex flex-1 items-center gap-4">
|
|
197
|
+
<div className="size-6 rounded-full bg-blue-500" />
|
|
198
|
+
<span className="text-xs">Data D</span>
|
|
199
|
+
</div>
|
|
200
|
+
<span className="text-xs">$2.91</span>
|
|
201
|
+
</div>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</TooltipContent>
|
|
205
|
+
</Tooltip>
|
|
206
|
+
<Tooltip>
|
|
207
|
+
<TooltipTrigger asChild>
|
|
208
|
+
<Button variant="secondary">Hover for graph data</Button>
|
|
209
|
+
</TooltipTrigger>
|
|
210
|
+
<TooltipContent className="w-160">
|
|
211
|
+
<div className="flex flex-col gap-4">
|
|
212
|
+
<div className="text-xs text-foreground-neutral-subtle">Jul 22, 2025</div>
|
|
213
|
+
<div className="flex flex-col gap-4">
|
|
214
|
+
<div className="flex items-center justify-between gap-12">
|
|
215
|
+
<div className="flex flex-1 items-center gap-4">
|
|
216
|
+
<div className="size-6 rounded-full bg-purple-500" />
|
|
217
|
+
<span className="text-xs">Data A</span>
|
|
218
|
+
</div>
|
|
219
|
+
<span className="text-xs">$6.14</span>
|
|
220
|
+
</div>
|
|
221
|
+
<div className="flex items-center justify-between gap-12">
|
|
222
|
+
<div className="flex flex-1 items-center gap-4">
|
|
223
|
+
<div className="size-6 rounded-full bg-green-500" />
|
|
224
|
+
<span className="text-xs">Data B</span>
|
|
225
|
+
</div>
|
|
226
|
+
<span className="text-xs">$4.37</span>
|
|
227
|
+
</div>
|
|
228
|
+
<div className="flex items-center justify-between gap-12">
|
|
229
|
+
<div className="flex flex-1 items-center gap-4">
|
|
230
|
+
<div className="size-6 rounded-full bg-orange-500" />
|
|
231
|
+
<span className="text-xs">Data C</span>
|
|
232
|
+
</div>
|
|
233
|
+
<span className="text-xs">$12.88</span>
|
|
234
|
+
</div>
|
|
235
|
+
<div className="flex items-center justify-between gap-12">
|
|
236
|
+
<div className="flex flex-1 items-center gap-4">
|
|
237
|
+
<div className="size-6 rounded-full bg-blue-500" />
|
|
238
|
+
<span className="text-xs">Data D</span>
|
|
239
|
+
</div>
|
|
240
|
+
<span className="text-xs">$2.91</span>
|
|
241
|
+
</div>
|
|
242
|
+
</div>
|
|
243
|
+
</div>
|
|
244
|
+
</TooltipContent>
|
|
245
|
+
</Tooltip>
|
|
246
|
+
</div>
|
|
247
|
+
</div>
|
|
248
|
+
|
|
249
|
+
{/* Breadcrumbs Type */}
|
|
250
|
+
<div className="flex flex-col gap-16">
|
|
251
|
+
<Code variant="label" className="text-foreground-neutral-subtle">
|
|
252
|
+
Type=Breadcrumbs
|
|
253
|
+
</Code>
|
|
254
|
+
<div className="flex gap-16">
|
|
255
|
+
<Tooltip>
|
|
256
|
+
<TooltipTrigger asChild>
|
|
257
|
+
<Button variant="primary">Breadcrumb</Button>
|
|
258
|
+
</TooltipTrigger>
|
|
259
|
+
<TooltipContent variant="inverted">
|
|
260
|
+
<div className="flex items-center gap-6">
|
|
261
|
+
<span>Breadcrumb</span>
|
|
262
|
+
<span className="text-foreground-neutral-muted">/</span>
|
|
263
|
+
<span>Breadcrumb</span>
|
|
264
|
+
</div>
|
|
265
|
+
</TooltipContent>
|
|
266
|
+
</Tooltip>
|
|
267
|
+
<Tooltip>
|
|
268
|
+
<TooltipTrigger asChild>
|
|
269
|
+
<Button variant="secondary">Breadcrumb</Button>
|
|
270
|
+
</TooltipTrigger>
|
|
271
|
+
<TooltipContent>
|
|
272
|
+
<div className="flex items-center gap-6">
|
|
273
|
+
<span>Breadcrumb</span>
|
|
274
|
+
<span className="text-foreground-neutral-muted">/</span>
|
|
275
|
+
<span>Breadcrumb</span>
|
|
276
|
+
</div>
|
|
277
|
+
</TooltipContent>
|
|
278
|
+
</Tooltip>
|
|
279
|
+
</div>
|
|
280
|
+
</div>
|
|
281
|
+
</div>
|
|
282
|
+
</div>
|
|
283
|
+
),
|
|
284
|
+
};
|