@andreagiugni/tailwind-dashboard-ui 0.1.0 → 0.2.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/README.md +2 -0
- package/dist/index.cjs +226 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +40 -1
- package/dist/index.d.ts +40 -1
- package/dist/index.js +225 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -224,6 +224,45 @@ interface ThemeToggleButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
224
224
|
}
|
|
225
225
|
declare const ThemeToggleButton: React.FC<ThemeToggleButtonProps>;
|
|
226
226
|
|
|
227
|
+
interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, ColorOverrideProps {
|
|
228
|
+
/** Heading shown above the description. */
|
|
229
|
+
title?: React.ReactNode;
|
|
230
|
+
/** Supporting text rendered under the title. */
|
|
231
|
+
description?: React.ReactNode;
|
|
232
|
+
/** Icon rendered in a rounded square above the title. */
|
|
233
|
+
icon?: React.ReactNode;
|
|
234
|
+
/** Optional cover image source. Rendered on top (or alongside when `horizontal`). */
|
|
235
|
+
image?: string;
|
|
236
|
+
/** Alt text for the cover image. */
|
|
237
|
+
imageAlt?: string;
|
|
238
|
+
/** Lay the image alongside the content instead of on top. */
|
|
239
|
+
horizontal?: boolean;
|
|
240
|
+
/** Footer area, e.g. a link or a `Button` call-to-action. */
|
|
241
|
+
footer?: React.ReactNode;
|
|
242
|
+
/** Custom body content, rendered after the description. */
|
|
243
|
+
children?: React.ReactNode;
|
|
244
|
+
}
|
|
245
|
+
declare const Card: React.FC<CardProps>;
|
|
246
|
+
|
|
247
|
+
type ToastVariant = "success" | "danger" | "warning" | "info";
|
|
248
|
+
interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, ColorOverrideProps {
|
|
249
|
+
/** Color/severity variant. */
|
|
250
|
+
variant?: ToastVariant;
|
|
251
|
+
title: React.ReactNode;
|
|
252
|
+
message?: React.ReactNode;
|
|
253
|
+
/** Override the default variant icon. */
|
|
254
|
+
icon?: React.ReactNode;
|
|
255
|
+
/** Hide the leading icon entirely. */
|
|
256
|
+
hideIcon?: boolean;
|
|
257
|
+
/** Render the dismiss button (default `true`). */
|
|
258
|
+
showCloseButton?: boolean;
|
|
259
|
+
/** Called when the close button is clicked. */
|
|
260
|
+
onClose?: () => void;
|
|
261
|
+
/** Hide the colored accent bar at the bottom. */
|
|
262
|
+
hideAccentBar?: boolean;
|
|
263
|
+
}
|
|
264
|
+
declare const Toast: React.FC<ToastProps>;
|
|
265
|
+
|
|
227
266
|
type AccordionSelectionMode = "single" | "multiple";
|
|
228
267
|
interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
229
268
|
/** Unique key identifying this item. */
|
|
@@ -570,4 +609,4 @@ interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
570
609
|
}
|
|
571
610
|
declare const Slider: React.FC<SliderProps>;
|
|
572
611
|
|
|
573
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSelectionMode, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarText, type AvatarTextProps, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, Code, type CodeColor, type CodeProps, type CodeSize, ColorOverrideProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownItemVariant, type DropdownProps, Dropzone, type DropzoneProps, FileInput, type FileInputProps, Form, type FormProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, type ModalVariant, MultiSelect, type MultiSelectProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Radio, type RadioProps, RadioSm, type RadioSmProps, Ribbon, type RibbonColor, type RibbonPosition, type RibbonProps, type RibbonVariant, Select, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderColor, type SliderProps, Snippet, type SnippetProps, type SnippetSize, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, TableCell, type TableCellProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSectionProps, Tabs, type TabsProps, type TabsVariant, TextArea, type TextAreaProps, ThemeToggleButton, type ThemeToggleButtonProps, Tooltip, type TooltipPlacement, type TooltipProps, cn };
|
|
612
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSelectionMode, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarText, type AvatarTextProps, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, Code, type CodeColor, type CodeProps, type CodeSize, ColorOverrideProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownItemVariant, type DropdownProps, Dropzone, type DropzoneProps, FileInput, type FileInputProps, Form, type FormProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, type ModalVariant, MultiSelect, type MultiSelectProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Radio, type RadioProps, RadioSm, type RadioSmProps, Ribbon, type RibbonColor, type RibbonPosition, type RibbonProps, type RibbonVariant, Select, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderColor, type SliderProps, Snippet, type SnippetProps, type SnippetSize, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, TableCell, type TableCellProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSectionProps, Tabs, type TabsProps, type TabsVariant, TextArea, type TextAreaProps, ThemeToggleButton, type ThemeToggleButtonProps, Toast, type ToastProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, cn };
|
package/dist/index.d.ts
CHANGED
|
@@ -224,6 +224,45 @@ interface ThemeToggleButtonProps extends React.ButtonHTMLAttributes<HTMLButtonEl
|
|
|
224
224
|
}
|
|
225
225
|
declare const ThemeToggleButton: React.FC<ThemeToggleButtonProps>;
|
|
226
226
|
|
|
227
|
+
interface CardProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, ColorOverrideProps {
|
|
228
|
+
/** Heading shown above the description. */
|
|
229
|
+
title?: React.ReactNode;
|
|
230
|
+
/** Supporting text rendered under the title. */
|
|
231
|
+
description?: React.ReactNode;
|
|
232
|
+
/** Icon rendered in a rounded square above the title. */
|
|
233
|
+
icon?: React.ReactNode;
|
|
234
|
+
/** Optional cover image source. Rendered on top (or alongside when `horizontal`). */
|
|
235
|
+
image?: string;
|
|
236
|
+
/** Alt text for the cover image. */
|
|
237
|
+
imageAlt?: string;
|
|
238
|
+
/** Lay the image alongside the content instead of on top. */
|
|
239
|
+
horizontal?: boolean;
|
|
240
|
+
/** Footer area, e.g. a link or a `Button` call-to-action. */
|
|
241
|
+
footer?: React.ReactNode;
|
|
242
|
+
/** Custom body content, rendered after the description. */
|
|
243
|
+
children?: React.ReactNode;
|
|
244
|
+
}
|
|
245
|
+
declare const Card: React.FC<CardProps>;
|
|
246
|
+
|
|
247
|
+
type ToastVariant = "success" | "danger" | "warning" | "info";
|
|
248
|
+
interface ToastProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title">, ColorOverrideProps {
|
|
249
|
+
/** Color/severity variant. */
|
|
250
|
+
variant?: ToastVariant;
|
|
251
|
+
title: React.ReactNode;
|
|
252
|
+
message?: React.ReactNode;
|
|
253
|
+
/** Override the default variant icon. */
|
|
254
|
+
icon?: React.ReactNode;
|
|
255
|
+
/** Hide the leading icon entirely. */
|
|
256
|
+
hideIcon?: boolean;
|
|
257
|
+
/** Render the dismiss button (default `true`). */
|
|
258
|
+
showCloseButton?: boolean;
|
|
259
|
+
/** Called when the close button is clicked. */
|
|
260
|
+
onClose?: () => void;
|
|
261
|
+
/** Hide the colored accent bar at the bottom. */
|
|
262
|
+
hideAccentBar?: boolean;
|
|
263
|
+
}
|
|
264
|
+
declare const Toast: React.FC<ToastProps>;
|
|
265
|
+
|
|
227
266
|
type AccordionSelectionMode = "single" | "multiple";
|
|
228
267
|
interface AccordionItemProps extends Omit<React.HTMLAttributes<HTMLDivElement>, "title"> {
|
|
229
268
|
/** Unique key identifying this item. */
|
|
@@ -570,4 +609,4 @@ interface SliderProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>,
|
|
|
570
609
|
}
|
|
571
610
|
declare const Slider: React.FC<SliderProps>;
|
|
572
611
|
|
|
573
|
-
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSelectionMode, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarText, type AvatarTextProps, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Checkbox, type CheckboxProps, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, Code, type CodeColor, type CodeProps, type CodeSize, ColorOverrideProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownItemVariant, type DropdownProps, Dropzone, type DropzoneProps, FileInput, type FileInputProps, Form, type FormProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, type ModalVariant, MultiSelect, type MultiSelectProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Radio, type RadioProps, RadioSm, type RadioSmProps, Ribbon, type RibbonColor, type RibbonPosition, type RibbonProps, type RibbonVariant, Select, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderColor, type SliderProps, Snippet, type SnippetProps, type SnippetSize, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, TableCell, type TableCellProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSectionProps, Tabs, type TabsProps, type TabsVariant, TextArea, type TextAreaProps, ThemeToggleButton, type ThemeToggleButtonProps, Tooltip, type TooltipPlacement, type TooltipProps, cn };
|
|
612
|
+
export { Accordion, AccordionItem, type AccordionItemProps, type AccordionProps, type AccordionSelectionMode, Alert, type AlertProps, type AlertVariant, Avatar, type AvatarProps, type AvatarSize, type AvatarStatus, AvatarText, type AvatarTextProps, Badge, type BadgeColor, type BadgeProps, type BadgeSize, type BadgeVariant, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Button, type ButtonProps, Card, type CardProps, Checkbox, type CheckboxProps, Chip, type ChipColor, type ChipProps, type ChipSize, type ChipVariant, Code, type CodeColor, type CodeProps, type CodeSize, ColorOverrideProps, DataTable, type DataTableColumn, type DataTableProps, DatePicker, type DatePickerProps, DateTimePicker, type DateTimePickerProps, Drawer, type DrawerPlacement, type DrawerProps, Dropdown, DropdownItem, type DropdownItemProps, type DropdownItemVariant, type DropdownProps, Dropzone, type DropzoneProps, FileInput, type FileInputProps, Form, type FormProps, Input, type InputProps, Label, type LabelProps, Modal, type ModalProps, type ModalVariant, MultiSelect, type MultiSelectProps, Pagination, type PaginationProps, PasswordInput, type PasswordInputProps, Popover, type PopoverPlacement, type PopoverProps, Progress, type ProgressColor, type ProgressProps, type ProgressSize, Radio, type RadioProps, RadioSm, type RadioSmProps, Ribbon, type RibbonColor, type RibbonPosition, type RibbonProps, type RibbonVariant, Select, type SelectProps, Skeleton, type SkeletonProps, Slider, type SliderColor, type SliderProps, Snippet, type SnippetProps, type SnippetSize, type SortDirection, Spinner, type SpinnerColor, type SpinnerProps, type SpinnerSize, Switch, type SwitchProps, Tab, type TabProps, Table, TableBody, TableCell, type TableCellProps, TableHeader, type TableProps, TableRow, type TableRowProps, type TableSectionProps, Tabs, type TabsProps, type TabsVariant, TextArea, type TextAreaProps, ThemeToggleButton, type ThemeToggleButtonProps, Toast, type ToastProps, type ToastVariant, Tooltip, type TooltipPlacement, type TooltipProps, cn };
|
package/dist/index.js
CHANGED
|
@@ -960,6 +960,230 @@ var ThemeToggleButton = ({
|
|
|
960
960
|
}
|
|
961
961
|
);
|
|
962
962
|
};
|
|
963
|
+
var Card = ({
|
|
964
|
+
title,
|
|
965
|
+
description,
|
|
966
|
+
icon,
|
|
967
|
+
image,
|
|
968
|
+
imageAlt = "",
|
|
969
|
+
horizontal = false,
|
|
970
|
+
footer,
|
|
971
|
+
children,
|
|
972
|
+
className,
|
|
973
|
+
bgColor,
|
|
974
|
+
textColor,
|
|
975
|
+
borderColor,
|
|
976
|
+
style,
|
|
977
|
+
...rest
|
|
978
|
+
}) => {
|
|
979
|
+
const cover = image ? /* @__PURE__ */ jsx(
|
|
980
|
+
"img",
|
|
981
|
+
{
|
|
982
|
+
src: image,
|
|
983
|
+
alt: imageAlt,
|
|
984
|
+
className: cn(
|
|
985
|
+
"object-cover",
|
|
986
|
+
horizontal ? "h-full w-full sm:w-2/5 sm:max-w-[16rem]" : "h-48 w-full"
|
|
987
|
+
)
|
|
988
|
+
}
|
|
989
|
+
) : null;
|
|
990
|
+
return /* @__PURE__ */ jsxs(
|
|
991
|
+
"div",
|
|
992
|
+
{
|
|
993
|
+
className: cn(
|
|
994
|
+
"overflow-hidden rounded-2xl border border-gray-200 bg-white dark:border-gray-800 dark:bg-white/[0.03]",
|
|
995
|
+
horizontal && image && "flex flex-col sm:flex-row",
|
|
996
|
+
className
|
|
997
|
+
),
|
|
998
|
+
style: { ...styleOverride({ bgColor, textColor, borderColor }), ...style },
|
|
999
|
+
...rest,
|
|
1000
|
+
children: [
|
|
1001
|
+
cover,
|
|
1002
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 p-5 sm:p-6", children: [
|
|
1003
|
+
icon && /* @__PURE__ */ jsx("div", { className: "mb-5 flex h-12 w-12 items-center justify-center rounded-xl bg-brand-50 text-brand-500 dark:bg-brand-500/15 dark:text-brand-400", children: icon }),
|
|
1004
|
+
title && /* @__PURE__ */ jsx("h3", { className: "text-lg font-semibold text-gray-800 dark:text-white/90", children: title }),
|
|
1005
|
+
description && /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500 dark:text-gray-400", children: description }),
|
|
1006
|
+
children,
|
|
1007
|
+
footer && /* @__PURE__ */ jsx("div", { className: "mt-4", children: footer })
|
|
1008
|
+
] })
|
|
1009
|
+
]
|
|
1010
|
+
}
|
|
1011
|
+
);
|
|
1012
|
+
};
|
|
1013
|
+
var toastIcons = {
|
|
1014
|
+
success: /* @__PURE__ */ jsx(
|
|
1015
|
+
"svg",
|
|
1016
|
+
{
|
|
1017
|
+
className: "fill-current",
|
|
1018
|
+
width: "20",
|
|
1019
|
+
height: "20",
|
|
1020
|
+
viewBox: "0 0 24 24",
|
|
1021
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1022
|
+
children: /* @__PURE__ */ jsx(
|
|
1023
|
+
"path",
|
|
1024
|
+
{
|
|
1025
|
+
fillRule: "evenodd",
|
|
1026
|
+
clipRule: "evenodd",
|
|
1027
|
+
d: "M3.70186 12.0001C3.70186 7.41711 7.41711 3.70186 12.0001 3.70186C16.5831 3.70186 20.2984 7.41711 20.2984 12.0001C20.2984 16.5831 16.5831 20.2984 12.0001 20.2984C7.41711 20.2984 3.70186 16.5831 3.70186 12.0001ZM12.0001 1.90186C6.423 1.90186 1.90186 6.423 1.90186 12.0001C1.90186 17.5772 6.423 22.0984 12.0001 22.0984C17.5772 22.0984 22.0984 17.5772 22.0984 12.0001C22.0984 6.423 17.5772 1.90186 12.0001 1.90186ZM15.6197 10.7395C15.9712 10.388 15.9712 9.81819 15.6197 9.46672C15.2683 9.11525 14.6984 9.11525 14.347 9.46672L11.1894 12.6243L9.6533 11.0883C9.30183 10.7368 8.73198 10.7368 8.38051 11.0883C8.02904 11.4397 8.02904 12.0096 8.38051 12.3611L10.553 14.5335C10.7217 14.7023 10.9507 14.7971 11.1894 14.7971C11.428 14.7971 11.657 14.7023 11.8257 14.5335L15.6197 10.7395Z"
|
|
1028
|
+
}
|
|
1029
|
+
)
|
|
1030
|
+
}
|
|
1031
|
+
),
|
|
1032
|
+
danger: /* @__PURE__ */ jsx(
|
|
1033
|
+
"svg",
|
|
1034
|
+
{
|
|
1035
|
+
className: "fill-current",
|
|
1036
|
+
width: "20",
|
|
1037
|
+
height: "20",
|
|
1038
|
+
viewBox: "0 0 24 24",
|
|
1039
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1040
|
+
children: /* @__PURE__ */ jsx(
|
|
1041
|
+
"path",
|
|
1042
|
+
{
|
|
1043
|
+
fillRule: "evenodd",
|
|
1044
|
+
clipRule: "evenodd",
|
|
1045
|
+
d: "M20.3499 12.0004C20.3499 16.612 16.6115 20.3504 11.9999 20.3504C7.38832 20.3504 3.6499 16.612 3.6499 12.0004C3.6499 7.38881 7.38833 3.65039 11.9999 3.65039C16.6115 3.65039 20.3499 7.38881 20.3499 12.0004ZM11.9999 22.1504C17.6056 22.1504 22.1499 17.6061 22.1499 12.0004C22.1499 6.3947 17.6056 1.85039 11.9999 1.85039C6.39421 1.85039 1.8499 6.3947 1.8499 12.0004C1.8499 17.6061 6.39421 22.1504 11.9999 22.1504ZM13.0008 16.4753C13.0008 15.923 12.5531 15.4753 12.0008 15.4753L11.9998 15.4753C11.4475 15.4753 10.9998 15.923 10.9998 16.4753C10.9998 17.0276 11.4475 17.4753 11.9998 17.4753L12.0008 17.4753C12.5531 17.4753 13.0008 17.0276 13.0008 16.4753ZM11.9998 6.62898C12.414 6.62898 12.7498 6.96476 12.7498 7.37898L12.7498 13.0555C12.7498 13.4697 12.414 13.8055 11.9998 13.8055C11.5856 13.8055 11.2498 13.4697 11.2498 13.0555L11.2498 7.37898C11.2498 6.96476 11.5856 6.62898 11.9998 6.62898Z"
|
|
1046
|
+
}
|
|
1047
|
+
)
|
|
1048
|
+
}
|
|
1049
|
+
),
|
|
1050
|
+
warning: /* @__PURE__ */ jsx(
|
|
1051
|
+
"svg",
|
|
1052
|
+
{
|
|
1053
|
+
className: "fill-current",
|
|
1054
|
+
width: "20",
|
|
1055
|
+
height: "20",
|
|
1056
|
+
viewBox: "0 0 24 24",
|
|
1057
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1058
|
+
children: /* @__PURE__ */ jsx(
|
|
1059
|
+
"path",
|
|
1060
|
+
{
|
|
1061
|
+
fillRule: "evenodd",
|
|
1062
|
+
clipRule: "evenodd",
|
|
1063
|
+
d: "M3.6501 12.0001C3.6501 7.38852 7.38852 3.6501 12.0001 3.6501C16.6117 3.6501 20.3501 7.38852 20.3501 12.0001C20.3501 16.6117 16.6117 20.3501 12.0001 20.3501C7.38852 20.3501 3.6501 16.6117 3.6501 12.0001ZM12.0001 1.8501C6.39441 1.8501 1.8501 6.39441 1.8501 12.0001C1.8501 17.6058 6.39441 22.1501 12.0001 22.1501C17.6058 22.1501 22.1501 17.6058 22.1501 12.0001C22.1501 6.39441 17.6058 1.8501 12.0001 1.8501ZM10.9992 7.52517C10.9992 8.07746 11.4469 8.52517 11.9992 8.52517H12.0002C12.5525 8.52517 13.0002 8.07746 13.0002 7.52517C13.0002 6.97289 12.5525 6.52517 12.0002 6.52517H11.9992C11.4469 6.52517 10.9992 6.97289 10.9992 7.52517ZM12.0002 17.3715C11.586 17.3715 11.2502 17.0357 11.2502 16.6215V10.945C11.2502 10.5308 11.586 10.195 12.0002 10.195C12.4144 10.195 12.7502 10.5308 12.7502 10.945V16.6215C12.7502 17.0357 12.4144 17.3715 12.0002 17.3715Z"
|
|
1064
|
+
}
|
|
1065
|
+
)
|
|
1066
|
+
}
|
|
1067
|
+
),
|
|
1068
|
+
info: /* @__PURE__ */ jsx(
|
|
1069
|
+
"svg",
|
|
1070
|
+
{
|
|
1071
|
+
className: "fill-current",
|
|
1072
|
+
width: "20",
|
|
1073
|
+
height: "20",
|
|
1074
|
+
viewBox: "0 0 24 24",
|
|
1075
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1076
|
+
children: /* @__PURE__ */ jsx(
|
|
1077
|
+
"path",
|
|
1078
|
+
{
|
|
1079
|
+
fillRule: "evenodd",
|
|
1080
|
+
clipRule: "evenodd",
|
|
1081
|
+
d: "M3.6501 11.9996C3.6501 7.38803 7.38852 3.64961 12.0001 3.64961C16.6117 3.64961 20.3501 7.38803 20.3501 11.9996C20.3501 16.6112 16.6117 20.3496 12.0001 20.3496C7.38852 20.3496 3.6501 16.6112 3.6501 11.9996ZM12.0001 1.84961C6.39441 1.84961 1.8501 6.39392 1.8501 11.9996C1.8501 17.6053 6.39441 22.1496 12.0001 22.1496C17.6058 22.1496 22.1501 17.6053 22.1501 11.9996C22.1501 6.39392 17.6058 1.84961 12.0001 1.84961ZM10.9992 7.52468C10.9992 8.07697 11.4469 8.52468 11.9992 8.52468H12.0002C12.5525 8.52468 13.0002 8.07697 13.0002 7.52468C13.0002 6.9724 12.5525 6.52468 12.0002 6.52468H11.9992C11.4469 6.52468 10.9992 6.9724 10.9992 7.52468ZM12.0002 17.371C11.586 17.371 11.2502 17.0352 11.2502 16.621V10.9445C11.2502 10.5303 11.586 10.1945 12.0002 10.1945C12.4144 10.1945 12.7502 10.5303 12.7502 10.9445V16.621C12.7502 17.0352 12.4144 17.371 12.0002 17.371Z"
|
|
1082
|
+
}
|
|
1083
|
+
)
|
|
1084
|
+
}
|
|
1085
|
+
)
|
|
1086
|
+
};
|
|
1087
|
+
var ToastCloseIcon = /* @__PURE__ */ jsx(
|
|
1088
|
+
"svg",
|
|
1089
|
+
{
|
|
1090
|
+
width: "18",
|
|
1091
|
+
height: "18",
|
|
1092
|
+
viewBox: "0 0 24 24",
|
|
1093
|
+
fill: "none",
|
|
1094
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1095
|
+
children: /* @__PURE__ */ jsx(
|
|
1096
|
+
"path",
|
|
1097
|
+
{
|
|
1098
|
+
fillRule: "evenodd",
|
|
1099
|
+
clipRule: "evenodd",
|
|
1100
|
+
d: "M6.04 16.54a.9.9 0 0 0 1.27 1.27L12 13.14l4.69 4.67a.9.9 0 1 0 1.27-1.27L13.27 11.87l4.69-4.68a.9.9 0 1 0-1.27-1.27L12 10.6 7.31 5.92a.9.9 0 0 0-1.27 1.27l4.69 4.68-4.69 4.67Z",
|
|
1101
|
+
fill: "currentColor"
|
|
1102
|
+
}
|
|
1103
|
+
)
|
|
1104
|
+
}
|
|
1105
|
+
);
|
|
1106
|
+
var variantStyles = {
|
|
1107
|
+
success: {
|
|
1108
|
+
iconWrap: "bg-success-50 text-success-600 dark:bg-success-500/15 dark:text-success-500",
|
|
1109
|
+
bar: "bg-success-500"
|
|
1110
|
+
},
|
|
1111
|
+
danger: {
|
|
1112
|
+
iconWrap: "bg-error-50 text-error-600 dark:bg-error-500/15 dark:text-error-500",
|
|
1113
|
+
bar: "bg-error-500"
|
|
1114
|
+
},
|
|
1115
|
+
warning: {
|
|
1116
|
+
iconWrap: "bg-warning-50 text-warning-600 dark:bg-warning-500/15 dark:text-orange-400",
|
|
1117
|
+
bar: "bg-warning-500"
|
|
1118
|
+
},
|
|
1119
|
+
info: {
|
|
1120
|
+
iconWrap: "bg-blue-light-50 text-blue-light-500 dark:bg-blue-light-500/15 dark:text-blue-light-500",
|
|
1121
|
+
bar: "bg-blue-light-500"
|
|
1122
|
+
}
|
|
1123
|
+
};
|
|
1124
|
+
var Toast = ({
|
|
1125
|
+
variant = "success",
|
|
1126
|
+
title,
|
|
1127
|
+
message,
|
|
1128
|
+
icon,
|
|
1129
|
+
hideIcon = false,
|
|
1130
|
+
showCloseButton = true,
|
|
1131
|
+
onClose,
|
|
1132
|
+
hideAccentBar = false,
|
|
1133
|
+
className,
|
|
1134
|
+
bgColor,
|
|
1135
|
+
textColor,
|
|
1136
|
+
borderColor,
|
|
1137
|
+
style,
|
|
1138
|
+
...rest
|
|
1139
|
+
}) => {
|
|
1140
|
+
const styles = variantStyles[variant];
|
|
1141
|
+
return /* @__PURE__ */ jsxs(
|
|
1142
|
+
"div",
|
|
1143
|
+
{
|
|
1144
|
+
role: "alert",
|
|
1145
|
+
className: cn(
|
|
1146
|
+
"relative flex items-center gap-3 overflow-hidden rounded-xl border border-gray-200 bg-white px-4 py-3.5 pr-10 shadow-theme-sm dark:border-gray-800 dark:bg-white/[0.03]",
|
|
1147
|
+
className
|
|
1148
|
+
),
|
|
1149
|
+
style: { ...styleOverride({ bgColor, textColor, borderColor }), ...style },
|
|
1150
|
+
...rest,
|
|
1151
|
+
children: [
|
|
1152
|
+
!hideIcon && /* @__PURE__ */ jsx(
|
|
1153
|
+
"span",
|
|
1154
|
+
{
|
|
1155
|
+
className: cn(
|
|
1156
|
+
"flex h-10 w-10 shrink-0 items-center justify-center rounded-lg",
|
|
1157
|
+
styles.iconWrap
|
|
1158
|
+
),
|
|
1159
|
+
children: icon ?? toastIcons[variant]
|
|
1160
|
+
}
|
|
1161
|
+
),
|
|
1162
|
+
/* @__PURE__ */ jsxs("div", { className: "min-w-0 flex-1", children: [
|
|
1163
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-semibold text-gray-800 dark:text-white/90", children: title }),
|
|
1164
|
+
message && /* @__PURE__ */ jsx("p", { className: "mt-0.5 text-sm text-gray-500 dark:text-gray-400", children: message })
|
|
1165
|
+
] }),
|
|
1166
|
+
showCloseButton && /* @__PURE__ */ jsx(
|
|
1167
|
+
"button",
|
|
1168
|
+
{
|
|
1169
|
+
type: "button",
|
|
1170
|
+
"aria-label": "Close",
|
|
1171
|
+
onClick: onClose,
|
|
1172
|
+
className: "absolute right-3 top-1/2 -translate-y-1/2 text-gray-400 transition hover:text-gray-700 dark:hover:text-gray-200",
|
|
1173
|
+
children: ToastCloseIcon
|
|
1174
|
+
}
|
|
1175
|
+
),
|
|
1176
|
+
!hideAccentBar && /* @__PURE__ */ jsx(
|
|
1177
|
+
"span",
|
|
1178
|
+
{
|
|
1179
|
+
className: cn("absolute inset-x-0 bottom-0 h-1", styles.bar),
|
|
1180
|
+
"aria-hidden": "true"
|
|
1181
|
+
}
|
|
1182
|
+
)
|
|
1183
|
+
]
|
|
1184
|
+
}
|
|
1185
|
+
);
|
|
1186
|
+
};
|
|
963
1187
|
var AccordionContext = React5.createContext(null);
|
|
964
1188
|
var ChevronIcon2 = ({ open }) => /* @__PURE__ */ jsx(
|
|
965
1189
|
"svg",
|
|
@@ -2811,6 +3035,6 @@ var Slider = ({
|
|
|
2811
3035
|
] });
|
|
2812
3036
|
};
|
|
2813
3037
|
|
|
2814
|
-
export { Accordion, AccordionItem, Alert, Avatar, AvatarText, Badge, Breadcrumb, Button, Checkbox, Chip, Code, DataTable, DatePicker, DateTimePicker, Drawer, Dropdown, DropdownItem, Dropzone, FileInput, Form, Input, Label, MultiSelect, Pagination, PasswordInput, Popover, Progress, Radio, RadioSm, Ribbon, Select, Skeleton, Slider, Snippet, Spinner, Switch, Tab, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, TextArea, ThemeToggleButton, Tooltip, styleOverride };
|
|
3038
|
+
export { Accordion, AccordionItem, Alert, Avatar, AvatarText, Badge, Breadcrumb, Button, Card, Checkbox, Chip, Code, DataTable, DatePicker, DateTimePicker, Drawer, Dropdown, DropdownItem, Dropzone, FileInput, Form, Input, Label, MultiSelect, Pagination, PasswordInput, Popover, Progress, Radio, RadioSm, Ribbon, Select, Skeleton, Slider, Snippet, Spinner, Switch, Tab, Table, TableBody, TableCell, TableHeader, TableRow, Tabs, TextArea, ThemeToggleButton, Toast, Tooltip, styleOverride };
|
|
2815
3039
|
//# sourceMappingURL=index.js.map
|
|
2816
3040
|
//# sourceMappingURL=index.js.map
|