feat: migrate public TimeField with shared date input parts

This commit is contained in:
maoyingjie
2026-10-26 17:56:41 +08:00
parent d74ad1b711
commit 97263d82e1
45 changed files with 2415 additions and 61 deletions
+21
View File
@@ -0,0 +1,21 @@
/* Source: HeroUI 3.2.6 / ce90ea3; Apache-2.0, see third-party/HEROUI-LICENSE. */
/* Time field styles */
.hv-time-field {
@apply flex flex-col gap-1;
&[data-invalid="true"],
&[aria-invalid="true"] {
[data-slot="description"] {
@apply hidden;
}
}
[data-slot="label"] {
@apply w-fit;
}
}
/* Full width modifier */
.hv-time-field--full-width {
@apply w-full;
}
+1
View File
@@ -163,6 +163,7 @@
@import "./components/date-input-group.css" layer(components);
@import "./components/date-field.css" layer(components);
@import "./components/time-field.css" layer(components);
@import "./components/calendar.css" layer(components);
/* RangeCalendar styling staged for the private range interaction fixture. */
+8
View File
@@ -1805,3 +1805,11 @@ export const colorSwatchVariants = tv({
});
export type ColorSwatchVariants = VariantProps<typeof colorSwatchVariants>;
/** HeroUI 3.2.6 / ce90ea3, Apache-2.0; hv namespace only. */
export const timeFieldVariants = tv({
base: "hv-time-field",
defaultVariants: { fullWidth: false },
variants: { fullWidth: { false: "", true: "hv-time-field--full-width" } },
});
export type TimeFieldVariants = VariantProps<typeof timeFieldVariants>;