feat: migrate RangeCalendar public components and demos

This commit is contained in:
maoyingjie
2026-10-26 21:25:25 +08:00
parent ebe81f28c7
commit 07f6aeadb6
43 changed files with 2420 additions and 53 deletions
+34
View File
@@ -1813,3 +1813,37 @@ export const timeFieldVariants = tv({
variants: { fullWidth: { false: "", true: "hv-time-field--full-width" } },
});
export type TimeFieldVariants = VariantProps<typeof timeFieldVariants>;
// Ported from HeroUI ce90ea3, Apache-2.0.
export const rangeCalendarVariants = tv({
defaultVariants: {},
slots: {
/** Root range calendar container */
base: "hv-range-calendar",
/** Calendar cell (td) */
cell: "hv-range-calendar__cell",
/** Cell indicator (small dot at bottom of cell) */
cellIndicator: "hv-range-calendar__cell-indicator",
/** Calendar grid (table) */
grid: "hv-range-calendar__grid",
/** Grid body (tbody) */
gridBody: "hv-range-calendar__grid-body",
/** Grid header (thead) */
gridHeader: "hv-range-calendar__grid-header",
/** Grid row (tr) */
gridRow: "hv-range-calendar__grid-row",
/** Calendar header containing heading and navigation */
header: "hv-range-calendar__header",
/** Header cell (th - day names) */
headerCell: "hv-range-calendar__header-cell",
/** Month/year heading text */
heading: "hv-range-calendar__heading",
/** Previous/Next navigation button */
navButton: "hv-range-calendar__nav-button",
/** Navigation button icon */
navButtonIcon: "hv-range-calendar__nav-button-icon",
},
variants: {},
});
export type RangeCalendarVariants = VariantProps<typeof rangeCalendarVariants>;