@youcan/celeste 0.6.30 → 0.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/celeste.css +293 -74
- package/dist/cjs/alert.js +2 -2
- package/dist/cjs/chunks/index.js +229 -2
- package/dist/cjs/chunks/index2.js +1457 -0
- package/dist/cjs/chunks/index3.js +16457 -0
- package/dist/cjs/chunks/sonner.js +1153 -0
- package/dist/cjs/config.js +136 -0
- package/dist/cjs/extra-settings.js +155 -0
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/label.js +2 -2
- package/dist/cjs/link-bubble.js +228 -0
- package/dist/cjs/link-button.js +2 -2
- package/dist/cjs/rich-editor.js +4996 -0
- package/dist/cjs/select-icon.js +2 -2
- package/dist/cjs/sonner-alert.js +41 -0
- package/dist/cjs/sonner.js +3 -0
- package/dist/cjs/text-input-affix.js +2 -2
- package/dist/cjs/types.js +1 -0
- package/dist/components/index.d.ts +2 -0
- package/dist/components/rich-editor/config.d.ts +33 -0
- package/dist/components/rich-editor/extra-settings.d.ts +6 -0
- package/dist/components/rich-editor/index.d.ts +2 -0
- package/dist/components/rich-editor/link-bubble.d.ts +11 -0
- package/dist/components/rich-editor/rich-editor.d.ts +55 -0
- package/dist/components/rich-editor/types.d.ts +19 -0
- package/dist/components/sonner/index.d.ts +4 -0
- package/dist/components/sonner/sonner-alert.d.ts +13 -0
- package/dist/components/sonner/sonner.d.ts +5 -0
- package/dist/es/alert.js +2 -2
- package/dist/es/checkbox-label.js +1 -1
- package/dist/es/chunks/index.js +277 -50
- package/dist/es/chunks/index2.js +1457 -0
- package/dist/es/chunks/index3.js +16458 -0
- package/dist/es/chunks/sonner.js +1154 -0
- package/dist/es/combobox-group.js +1 -1
- package/dist/es/combobox-input.js +1 -1
- package/dist/es/combobox-item.js +1 -1
- package/dist/es/combobox-list.js +1 -1
- package/dist/es/combobox-root.js +1 -1
- package/dist/es/combobox-separator.js +1 -1
- package/dist/es/combobox-trigger.js +1 -1
- package/dist/es/command-group.js +1 -1
- package/dist/es/command-input.js +1 -1
- package/dist/es/command-item.js +1 -1
- package/dist/es/command-list.js +1 -1
- package/dist/es/command-root.js +1 -1
- package/dist/es/command-separator.js +1 -1
- package/dist/es/config.js +136 -0
- package/dist/es/dropdown-menu-group.js +1 -1
- package/dist/es/dropdown-menu-item.js +1 -1
- package/dist/es/dropdown-menu-label.js +1 -1
- package/dist/es/dropdown-menu-separator.js +1 -1
- package/dist/es/dropdown-menu-trigger.js +1 -1
- package/dist/es/dropdown-menu.js +1 -1
- package/dist/es/dropdown.js +1 -1
- package/dist/es/extra-settings.js +156 -0
- package/dist/es/index.js +27 -18
- package/dist/es/label.js +3 -3
- package/dist/es/link-bubble.js +229 -0
- package/dist/es/link-button.js +2 -2
- package/dist/es/modal-content.js +1 -1
- package/dist/es/modal-header.js +1 -1
- package/dist/es/popover-content.js +1 -1
- package/dist/es/popover-trigger.js +1 -1
- package/dist/es/rich-editor.js +4997 -0
- package/dist/es/scroll-bar.js +1 -1
- package/dist/es/segmented-control-item.js +1 -1
- package/dist/es/segmented-control.js +1 -1
- package/dist/es/select-content.js +1 -1
- package/dist/es/select-icon.js +2 -2
- package/dist/es/select-item.js +1 -1
- package/dist/es/select-trigger.js +1 -1
- package/dist/es/select-value.js +1 -1
- package/dist/es/sonner-alert.js +42 -0
- package/dist/es/sonner.js +4 -0
- package/dist/es/tab-menu-content.js +1 -1
- package/dist/es/tab-menu-item.js +1 -1
- package/dist/es/tab-menu-list.js +1 -1
- package/dist/es/tab-menu.js +1 -1
- package/dist/es/text-input-affix.js +2 -2
- package/dist/es/tooltip.js +1 -1
- package/dist/es/types.js +1 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/sonner.d.ts +19 -0
- package/package.json +15 -4
- package/src/components/index.ts +2 -0
- package/src/components/rich-editor/config.ts +150 -0
- package/src/components/rich-editor/extra-settings.vue +151 -0
- package/src/components/rich-editor/index.ts +2 -0
- package/src/components/rich-editor/link-bubble.vue +288 -0
- package/src/components/rich-editor/rich-editor.vue +428 -0
- package/src/components/rich-editor/stories/rich-editor.stories.ts +87 -0
- package/src/components/rich-editor/types.ts +21 -0
- package/src/components/sonner/index.ts +5 -0
- package/src/components/sonner/sonner-alert.vue +54 -0
- package/src/components/sonner/sonner.vue +13 -0
- package/src/components/sonner/stories/sonner.stories.ts +194 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/sonner.ts +72 -0
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import RichEditor from '../rich-editor.vue';
|
|
3
|
+
|
|
4
|
+
const meta: Meta<typeof RichEditor> = {
|
|
5
|
+
title: 'Components/RichEditor',
|
|
6
|
+
component: RichEditor,
|
|
7
|
+
|
|
8
|
+
argTypes: {
|
|
9
|
+
customToolbar: {
|
|
10
|
+
description: `An array of toolbar item slugs that defines the order and visibility of editor actions.
|
|
11
|
+
* item_slugs: [
|
|
12
|
+
'heading',
|
|
13
|
+
'fontSize',
|
|
14
|
+
'color',
|
|
15
|
+
'bold',
|
|
16
|
+
'italic',
|
|
17
|
+
'underline',
|
|
18
|
+
'strike',
|
|
19
|
+
'bulletList',
|
|
20
|
+
'orderedList',
|
|
21
|
+
'align',
|
|
22
|
+
'link',
|
|
23
|
+
'undo',
|
|
24
|
+
'redo',
|
|
25
|
+
'clear',
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
* 'divider': use it for separation.
|
|
29
|
+
|
|
30
|
+
Example: ['bold', 'divider', 'color']
|
|
31
|
+
`,
|
|
32
|
+
},
|
|
33
|
+
showExtraSettings: {
|
|
34
|
+
description: 'Controls the visibility of the dropdown menu containing options like copy, cut, delete, and duplicate.',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export default meta;
|
|
40
|
+
|
|
41
|
+
type Story = StoryObj<typeof RichEditor>;
|
|
42
|
+
|
|
43
|
+
export const Default: Story = {
|
|
44
|
+
args: {
|
|
45
|
+
modelValue: '',
|
|
46
|
+
customToolbar: [],
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
render: args => ({
|
|
50
|
+
components: { RichEditor },
|
|
51
|
+
setup() {
|
|
52
|
+
return { args };
|
|
53
|
+
},
|
|
54
|
+
template: `
|
|
55
|
+
<RichEditor v-bind="args" />
|
|
56
|
+
`,
|
|
57
|
+
}),
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
export const CustomToolbar: Story = {
|
|
61
|
+
args: {
|
|
62
|
+
modelValue: '',
|
|
63
|
+
placeholder: 'Write something...',
|
|
64
|
+
customToolbar: [
|
|
65
|
+
'heading',
|
|
66
|
+
'divider',
|
|
67
|
+
'fontSize',
|
|
68
|
+
'divider',
|
|
69
|
+
'bold',
|
|
70
|
+
'underline',
|
|
71
|
+
'divider',
|
|
72
|
+
'align',
|
|
73
|
+
],
|
|
74
|
+
maxLimit: 200,
|
|
75
|
+
showExtraSettings: false,
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
render: args => ({
|
|
79
|
+
components: { RichEditor },
|
|
80
|
+
setup() {
|
|
81
|
+
return { args };
|
|
82
|
+
},
|
|
83
|
+
template: `
|
|
84
|
+
<RichEditor v-bind="args" />
|
|
85
|
+
`,
|
|
86
|
+
}),
|
|
87
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export interface ToolbarChildOption {
|
|
2
|
+
option: string;
|
|
3
|
+
name: string;
|
|
4
|
+
icon?: string;
|
|
5
|
+
active: string | Record<string, unknown>;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ToolbarAction {
|
|
9
|
+
type?: 'action';
|
|
10
|
+
slug: string;
|
|
11
|
+
name?: string;
|
|
12
|
+
icon?: string;
|
|
13
|
+
active?: string | Record<string, unknown>;
|
|
14
|
+
children?: ToolbarChildOption[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
interface ToolbarDivider {
|
|
18
|
+
type: 'divider';
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export type ToolbarItem = ToolbarAction | ToolbarDivider;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Alert, type AlertProps } from '../alert';
|
|
3
|
+
|
|
4
|
+
export interface SonnerAlertProps extends /* @vue-ignore */ Partial<AlertProps> {
|
|
5
|
+
title: string;
|
|
6
|
+
description?: string;
|
|
7
|
+
onDismiss?: () => void;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const props = withDefaults(
|
|
11
|
+
defineProps<SonnerAlertProps>(),
|
|
12
|
+
{
|
|
13
|
+
size: 'lg',
|
|
14
|
+
variant: 'stroke',
|
|
15
|
+
state: 'success',
|
|
16
|
+
dismissable: true,
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
function handleDismiss(): void {
|
|
21
|
+
if (props.onDismiss) {
|
|
22
|
+
props.onDismiss();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<template>
|
|
28
|
+
<Alert
|
|
29
|
+
v-bind="props"
|
|
30
|
+
class="sonner-alert"
|
|
31
|
+
@dismiss="handleDismiss"
|
|
32
|
+
>
|
|
33
|
+
<template #title>
|
|
34
|
+
{{ props.title }}
|
|
35
|
+
</template>
|
|
36
|
+
<template v-if="props.description" #description>
|
|
37
|
+
{{ props.description }}
|
|
38
|
+
</template>
|
|
39
|
+
</Alert>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<style scoped>
|
|
43
|
+
.sonner-alert {
|
|
44
|
+
width: min(360px, calc(100vw - 32px));
|
|
45
|
+
min-width: 360px;
|
|
46
|
+
max-width: 360px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
@media (width <= 400px) {
|
|
50
|
+
.sonner-alert {
|
|
51
|
+
min-width: calc(100vw - 32px);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { Toaster, type ToasterProps } from 'vue-sonner';
|
|
3
|
+
|
|
4
|
+
const props = defineProps<SonnerProps>();
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<script lang="ts">
|
|
8
|
+
export interface SonnerProps extends ToasterProps {}
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<template>
|
|
12
|
+
<Toaster v-bind="props" />
|
|
13
|
+
</template>
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/vue3-vite';
|
|
2
|
+
import { toast } from '../../../utils/sonner';
|
|
3
|
+
import Button from '../../button/button.vue';
|
|
4
|
+
import Sonner from '../sonner.vue';
|
|
5
|
+
import 'vue-sonner/style.css';
|
|
6
|
+
|
|
7
|
+
const meta: Meta<typeof Sonner> = {
|
|
8
|
+
title: 'Components/Sonner',
|
|
9
|
+
component: Sonner,
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default meta;
|
|
13
|
+
|
|
14
|
+
type Story = StoryObj<typeof Sonner>;
|
|
15
|
+
|
|
16
|
+
export const Default: Story = {
|
|
17
|
+
args: {
|
|
18
|
+
position: 'top-center',
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
render: args => ({
|
|
22
|
+
components: { Sonner, Button },
|
|
23
|
+
setup() {
|
|
24
|
+
const showBasicToast = (): void => {
|
|
25
|
+
toast('Event has been created', { dismissable: false });
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
const showToastWithDescription = (): void => {
|
|
29
|
+
toast('Event has been created', {
|
|
30
|
+
description: 'Monday, January 3rd at 6:00pm',
|
|
31
|
+
});
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
const showSuccessToast = (): void => {
|
|
35
|
+
toast.success('Changes saved!', {
|
|
36
|
+
description: 'Your changes have been saved successfully.',
|
|
37
|
+
});
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const showErrorToast = (): void => {
|
|
41
|
+
toast.error('Something went wrong!', {
|
|
42
|
+
description: 'Please try again later.',
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
const showWarningToast = (): void => {
|
|
47
|
+
toast.warning('Please review!', {
|
|
48
|
+
description: 'Please review your changes before proceeding.',
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const showInfoToast = (): void => {
|
|
53
|
+
toast.info('Information', {
|
|
54
|
+
description: 'Here is some helpful information.',
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const showFeatureToast = (): void => {
|
|
59
|
+
toast.feature('New Feature!', {
|
|
60
|
+
description: 'Check out this amazing new feature.',
|
|
61
|
+
});
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
const showFillVariant = (): void => {
|
|
65
|
+
toast.success('Success with fill!', {
|
|
66
|
+
description: 'This uses the fill variant style.',
|
|
67
|
+
variant: 'fill',
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
const showLightVariant = (): void => {
|
|
72
|
+
toast.info('Info with light variant', {
|
|
73
|
+
description: 'This uses the light variant style.',
|
|
74
|
+
variant: 'light',
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const showDismissExample = (): void => {
|
|
79
|
+
const toastId = toast('This toast can be dismissed', {
|
|
80
|
+
description: 'Click the dismiss button to remove this toast.',
|
|
81
|
+
duration: Infinity,
|
|
82
|
+
});
|
|
83
|
+
|
|
84
|
+
setTimeout(() => {
|
|
85
|
+
toast.dismiss(toastId);
|
|
86
|
+
toast.success('Toast dismissed!', {
|
|
87
|
+
description: 'The previous toast was programmatically dismissed.',
|
|
88
|
+
});
|
|
89
|
+
}, 3000);
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
const showCustomSizing = (): void => {
|
|
93
|
+
toast('Custom sized toast', {
|
|
94
|
+
description: 'This toast uses a smaller size.',
|
|
95
|
+
size: 'sm',
|
|
96
|
+
});
|
|
97
|
+
};
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
args,
|
|
101
|
+
showBasicToast,
|
|
102
|
+
showToastWithDescription,
|
|
103
|
+
showSuccessToast,
|
|
104
|
+
showErrorToast,
|
|
105
|
+
showWarningToast,
|
|
106
|
+
showInfoToast,
|
|
107
|
+
showFeatureToast,
|
|
108
|
+
showFillVariant,
|
|
109
|
+
showLightVariant,
|
|
110
|
+
showDismissExample,
|
|
111
|
+
showCustomSizing,
|
|
112
|
+
};
|
|
113
|
+
},
|
|
114
|
+
template: `
|
|
115
|
+
<div class="sonner-story-container">
|
|
116
|
+
<Sonner v-bind="args" />
|
|
117
|
+
|
|
118
|
+
<div class="space-y-6">
|
|
119
|
+
<div>
|
|
120
|
+
<h3 class="story-heading">Basic Toasts</h3>
|
|
121
|
+
<p class="story-description">
|
|
122
|
+
Default: success state, stroke variant, large size, dismissable
|
|
123
|
+
</p>
|
|
124
|
+
<div class="button-grid">
|
|
125
|
+
<Button @click="showBasicToast" size="sm" intent="primary">
|
|
126
|
+
Basic Toast
|
|
127
|
+
</Button>
|
|
128
|
+
|
|
129
|
+
<Button @click="showToastWithDescription" size="sm" intent="primary">
|
|
130
|
+
With Description
|
|
131
|
+
</Button>
|
|
132
|
+
|
|
133
|
+
<Button @click="showCustomSizing" size="sm" intent="neutral">
|
|
134
|
+
Custom Size (sm)
|
|
135
|
+
</Button>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<div>
|
|
140
|
+
<h3 class="story-heading">Helper Functions</h3>
|
|
141
|
+
<div class="button-grid">
|
|
142
|
+
<Button @click="showSuccessToast" size="sm" intent="primary">
|
|
143
|
+
toast.success()
|
|
144
|
+
</Button>
|
|
145
|
+
|
|
146
|
+
<Button @click="showErrorToast" size="sm" intent="error">
|
|
147
|
+
toast.error()
|
|
148
|
+
</Button>
|
|
149
|
+
|
|
150
|
+
<Button @click="showWarningToast" size="sm" intent="neutral">
|
|
151
|
+
toast.warning()
|
|
152
|
+
</Button>
|
|
153
|
+
|
|
154
|
+
<Button @click="showInfoToast" size="sm" intent="neutral">
|
|
155
|
+
toast.info()
|
|
156
|
+
</Button>
|
|
157
|
+
|
|
158
|
+
<Button @click="showFeatureToast" size="sm" intent="primary">
|
|
159
|
+
toast.feature()
|
|
160
|
+
</Button>
|
|
161
|
+
</div>
|
|
162
|
+
</div>
|
|
163
|
+
|
|
164
|
+
<div>
|
|
165
|
+
<h3 class="story-heading">Variant Examples</h3>
|
|
166
|
+
<div class="button-grid">
|
|
167
|
+
<Button @click="showFillVariant" size="sm" intent="primary">
|
|
168
|
+
Success + Fill
|
|
169
|
+
</Button>
|
|
170
|
+
|
|
171
|
+
<Button @click="showLightVariant" size="sm" intent="neutral">
|
|
172
|
+
Info + Light
|
|
173
|
+
</Button>
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div>
|
|
178
|
+
<h3 class="story-heading">Advanced Features</h3>
|
|
179
|
+
<div class="button-grid">
|
|
180
|
+
<Button @click="showDismissExample" size="sm" intent="neutral">
|
|
181
|
+
Auto-dismiss Demo
|
|
182
|
+
</Button>
|
|
183
|
+
</div>
|
|
184
|
+
</div>
|
|
185
|
+
</div>
|
|
186
|
+
|
|
187
|
+
<p class="story-description mt-6">
|
|
188
|
+
All toasts are 360px wide when space allows, but shrink responsively on narrow viewports. They appear in the {{ args.position }} position.
|
|
189
|
+
Default styling: success state, stroke variant, large size, dismissable.
|
|
190
|
+
</p>
|
|
191
|
+
</div>
|
|
192
|
+
`,
|
|
193
|
+
}),
|
|
194
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import type { SonnerAlertProps } from '@/components/sonner/sonner-alert.vue';
|
|
2
|
+
import SonnerAlert from '@/components/sonner/sonner-alert.vue';
|
|
3
|
+
import { markRaw } from 'vue';
|
|
4
|
+
import { type ExternalToast, toast as sonner } from 'vue-sonner';
|
|
5
|
+
|
|
6
|
+
export interface ToastOptions extends ExternalToast {
|
|
7
|
+
state?: SonnerAlertProps['state'];
|
|
8
|
+
variant?: SonnerAlertProps['variant'];
|
|
9
|
+
size?: SonnerAlertProps['size'];
|
|
10
|
+
dismissable?: SonnerAlertProps['dismissable'];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function createToast(title: string, data?: ToastOptions): string | number {
|
|
14
|
+
const {
|
|
15
|
+
state = 'success',
|
|
16
|
+
variant = 'stroke',
|
|
17
|
+
size = 'lg',
|
|
18
|
+
dismissable = true,
|
|
19
|
+
...externalToastProps
|
|
20
|
+
} = data || {};
|
|
21
|
+
|
|
22
|
+
let toastId: string | number;
|
|
23
|
+
|
|
24
|
+
const dismissToast = (): void => {
|
|
25
|
+
sonner.dismiss(toastId);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
toastId = sonner.custom(markRaw(SonnerAlert), {
|
|
29
|
+
...externalToastProps,
|
|
30
|
+
componentProps: {
|
|
31
|
+
title,
|
|
32
|
+
description: data?.description,
|
|
33
|
+
state,
|
|
34
|
+
variant,
|
|
35
|
+
size,
|
|
36
|
+
dismissable,
|
|
37
|
+
onDismiss: dismissToast,
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
|
|
41
|
+
return toastId;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export const toast = Object.assign(createToast, {
|
|
45
|
+
success: (title: string, data?: Omit<ToastOptions, 'state'>): string | number => {
|
|
46
|
+
return createToast(title, { ...data, state: 'success' });
|
|
47
|
+
},
|
|
48
|
+
|
|
49
|
+
error: (title: string, data?: Omit<ToastOptions, 'state'>): string | number => {
|
|
50
|
+
return createToast(title, { ...data, state: 'error' });
|
|
51
|
+
},
|
|
52
|
+
|
|
53
|
+
warning: (title: string, data?: Omit<ToastOptions, 'state'>): string | number => {
|
|
54
|
+
return createToast(title, { ...data, state: 'warning' });
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
info: (title: string, data?: Omit<ToastOptions, 'state'>): string | number => {
|
|
58
|
+
return createToast(title, { ...data, state: 'information' });
|
|
59
|
+
},
|
|
60
|
+
|
|
61
|
+
feature: (title: string, data?: Omit<ToastOptions, 'state'>): string | number => {
|
|
62
|
+
return createToast(title, { ...data, state: 'feature' });
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
dismiss: (id?: string | number): void => {
|
|
66
|
+
sonner.dismiss(id);
|
|
67
|
+
},
|
|
68
|
+
|
|
69
|
+
loading: (title: string, data?: ExternalToast): string | number => {
|
|
70
|
+
return sonner.loading(title, data);
|
|
71
|
+
},
|
|
72
|
+
});
|