@algorithm-shift/design-system 1.2.998 → 1.2.999
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/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +30 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -474,10 +474,17 @@ type SonnerToastProps = {
|
|
|
474
474
|
onAction?: () => void;
|
|
475
475
|
};
|
|
476
476
|
declare function showSonnerToast({ title, description, variant, duration, actionLabel, onAction, }: SonnerToastProps): void;
|
|
477
|
+
type ConfirmToastOptions = {
|
|
478
|
+
title: string;
|
|
479
|
+
description?: string;
|
|
480
|
+
confirmLabel?: string;
|
|
481
|
+
cancelLabel?: string;
|
|
482
|
+
};
|
|
483
|
+
declare function showConfirmToast({ title, description, confirmLabel, cancelLabel, }: ConfirmToastOptions): Promise<boolean>;
|
|
477
484
|
|
|
478
485
|
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
479
486
|
|
|
480
487
|
declare function cn(...inputs: ClassValue[]): string;
|
|
481
488
|
declare function getInitials(name: string): string;
|
|
482
489
|
|
|
483
|
-
export { Accordion, AccordionGroup, _default$1 as BarChart, Breadcrumb, ButtonWrapper as Button, ButtonGroup, CheckboxInput as Checkbox, Container, DateTimePicker as DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, HistoryTimeline, Icon, ImageControl as Image, Modal, MultiCheckbox, LazyMultiSelectDropdown as MultiSelect, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, _default as PieChart, RadioInput as RadioGroup, _default$2 as Repeater, RichText, SearchInput as Search, Shape, Slot, Spacer, StagesComponent as Stages, SwitchToggle, TabGroupComponent as TabGroup, TabList, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Toaster, Typography, UrlInput as URL, cn, getInitials, showSonnerToast };
|
|
490
|
+
export { Accordion, AccordionGroup, _default$1 as BarChart, Breadcrumb, ButtonWrapper as Button, ButtonGroup, CheckboxInput as Checkbox, Container, DateTimePicker as DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, HistoryTimeline, Icon, ImageControl as Image, Modal, MultiCheckbox, LazyMultiSelectDropdown as MultiSelect, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, _default as PieChart, RadioInput as RadioGroup, _default$2 as Repeater, RichText, SearchInput as Search, Shape, Slot, Spacer, StagesComponent as Stages, SwitchToggle, TabGroupComponent as TabGroup, TabList, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Toaster, Typography, UrlInput as URL, cn, getInitials, showConfirmToast, showSonnerToast };
|
package/dist/index.d.ts
CHANGED
|
@@ -474,10 +474,17 @@ type SonnerToastProps = {
|
|
|
474
474
|
onAction?: () => void;
|
|
475
475
|
};
|
|
476
476
|
declare function showSonnerToast({ title, description, variant, duration, actionLabel, onAction, }: SonnerToastProps): void;
|
|
477
|
+
type ConfirmToastOptions = {
|
|
478
|
+
title: string;
|
|
479
|
+
description?: string;
|
|
480
|
+
confirmLabel?: string;
|
|
481
|
+
cancelLabel?: string;
|
|
482
|
+
};
|
|
483
|
+
declare function showConfirmToast({ title, description, confirmLabel, cancelLabel, }: ConfirmToastOptions): Promise<boolean>;
|
|
477
484
|
|
|
478
485
|
declare const Toaster: ({ ...props }: ToasterProps) => react_jsx_runtime.JSX.Element;
|
|
479
486
|
|
|
480
487
|
declare function cn(...inputs: ClassValue[]): string;
|
|
481
488
|
declare function getInitials(name: string): string;
|
|
482
489
|
|
|
483
|
-
export { Accordion, AccordionGroup, _default$1 as BarChart, Breadcrumb, ButtonWrapper as Button, ButtonGroup, CheckboxInput as Checkbox, Container, DateTimePicker as DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, HistoryTimeline, Icon, ImageControl as Image, Modal, MultiCheckbox, LazyMultiSelectDropdown as MultiSelect, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, _default as PieChart, RadioInput as RadioGroup, _default$2 as Repeater, RichText, SearchInput as Search, Shape, Slot, Spacer, StagesComponent as Stages, SwitchToggle, TabGroupComponent as TabGroup, TabList, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Toaster, Typography, UrlInput as URL, cn, getInitials, showSonnerToast };
|
|
490
|
+
export { Accordion, AccordionGroup, _default$1 as BarChart, Breadcrumb, ButtonWrapper as Button, ButtonGroup, CheckboxInput as Checkbox, Container, DateTimePicker as DatePicker, DateRange, Dropdown, EmailInput as Email, EmailComposer, FileInput, Flex as FlexLayout, Grid as GridLayout, HistoryTimeline, Icon, ImageControl as Image, Modal, MultiCheckbox, LazyMultiSelectDropdown as MultiSelect, Navbar, NumberInput, CustomPagination as Pagination, PasswordInput as Password, PhoneInput as Phone, _default as PieChart, RadioInput as RadioGroup, _default$2 as Repeater, RichText, SearchInput as Search, Shape, Slot, Spacer, StagesComponent as Stages, SwitchToggle, TabGroupComponent as TabGroup, TabList, Table, Tabs, TextInput as Text, TextInputGroup, Textarea, Toaster, Typography, UrlInput as URL, cn, getInitials, showConfirmToast, showSonnerToast };
|
package/dist/index.js
CHANGED
|
@@ -80,6 +80,7 @@ __export(src_exports, {
|
|
|
80
80
|
URL: () => UrlInput_default,
|
|
81
81
|
cn: () => cn,
|
|
82
82
|
getInitials: () => getInitials,
|
|
83
|
+
showConfirmToast: () => showConfirmToast,
|
|
83
84
|
showSonnerToast: () => showSonnerToast
|
|
84
85
|
});
|
|
85
86
|
module.exports = __toCommonJS(src_exports);
|
|
@@ -4936,6 +4937,34 @@ function showSonnerToast({
|
|
|
4936
4937
|
(0, import_sonner.toast)(title, options);
|
|
4937
4938
|
}
|
|
4938
4939
|
}
|
|
4940
|
+
function showConfirmToast({
|
|
4941
|
+
title,
|
|
4942
|
+
description,
|
|
4943
|
+
confirmLabel = "Confirm",
|
|
4944
|
+
cancelLabel = "Cancel"
|
|
4945
|
+
}) {
|
|
4946
|
+
return new Promise((resolve) => {
|
|
4947
|
+
const id = (0, import_sonner.toast)(title, {
|
|
4948
|
+
description,
|
|
4949
|
+
duration: Infinity,
|
|
4950
|
+
closeButton: false,
|
|
4951
|
+
action: {
|
|
4952
|
+
label: confirmLabel,
|
|
4953
|
+
onClick: () => {
|
|
4954
|
+
resolve(true);
|
|
4955
|
+
import_sonner.toast.dismiss(id);
|
|
4956
|
+
}
|
|
4957
|
+
},
|
|
4958
|
+
cancel: {
|
|
4959
|
+
label: cancelLabel,
|
|
4960
|
+
onClick: () => {
|
|
4961
|
+
resolve(false);
|
|
4962
|
+
import_sonner.toast.dismiss(id);
|
|
4963
|
+
}
|
|
4964
|
+
}
|
|
4965
|
+
});
|
|
4966
|
+
});
|
|
4967
|
+
}
|
|
4939
4968
|
|
|
4940
4969
|
// src/components/Navigation/Tabs/Tabs.tsx
|
|
4941
4970
|
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
@@ -6367,6 +6396,7 @@ var Toaster = ({ ...props }) => {
|
|
|
6367
6396
|
URL,
|
|
6368
6397
|
cn,
|
|
6369
6398
|
getInitials,
|
|
6399
|
+
showConfirmToast,
|
|
6370
6400
|
showSonnerToast
|
|
6371
6401
|
});
|
|
6372
6402
|
//# sourceMappingURL=index.js.map
|