feat: migrate Toast and Table with reviewed state focus and SSR contracts

This commit is contained in:
maoyingjie
2026-10-24 07:19:26 +08:00
parent 0cfe7b6195
commit ed41af5294
95 changed files with 9358 additions and 8 deletions
+99
View File
@@ -1419,3 +1419,102 @@ export const drawerVariants = tv({
});
export type DrawerVariants = VariantProps<typeof drawerVariants>;
export const toastVariants = tv({
defaultVariants: {
placement: "bottom",
variant: "default",
},
slots: {
action: "hv-toast__action",
close: "hv-toast__close-button",
content: "hv-toast__content",
description: "hv-toast__description",
indicator: "hv-toast__indicator",
region: "hv-toast-region",
title: "hv-toast__title",
toast: "hv-toast",
},
variants: {
placement: {
bottom: {
region: "hv-toast-region--bottom",
toast: "hv-toast--bottom",
},
"bottom end": {
region: "hv-toast-region--bottom-end",
toast: "hv-toast--bottom-end",
},
"bottom start": {
region: "hv-toast-region--bottom-start",
toast: "hv-toast--bottom-start",
},
top: {
region: "hv-toast-region--top",
toast: "hv-toast--top",
},
"top end": {
region: "hv-toast-region--top-end",
toast: "hv-toast--top-end",
},
"top start": {
region: "hv-toast-region--top-start",
toast: "hv-toast--top-start",
},
},
variant: {
accent: {
toast: "hv-toast--accent",
},
danger: {
toast: "hv-toast--danger",
},
default: {
toast: "hv-toast--default",
},
success: {
toast: "hv-toast--success",
},
warning: {
toast: "hv-toast--warning",
},
},
},
});
export type ToastVariants = VariantProps<typeof toastVariants>;
export const tableVariants = tv({
defaultVariants: {
variant: "primary",
},
slots: {
base: "hv-table-root",
body: "hv-table__body",
cell: "hv-table__cell",
column: "hv-table__column",
columnResizer: "hv-table__column-resizer",
content: "hv-table__content",
footer: "hv-table__footer",
header: "hv-table__header",
loadMore: "hv-table__load-more",
loadMoreContent: "hv-table__load-more-content",
resizableContainer: "hv-table__resizable-container",
row: "hv-table__row",
scrollContainer: "hv-table__scroll-container",
sortableColumnHeader: "hv-table__sortable-column-header",
sortableColumnIndicator: "hv-table__sortable-column-indicator",
},
variants: {
variant: {
primary: {
base: "hv-table-root--primary",
},
secondary: {
base: "hv-table-root--secondary",
},
},
},
});
export type TableVariants = VariantProps<typeof tableVariants>;