feat: migrate public DatePicker with shared field and calendar owners
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
/* Adapted from HeroUI ce90ea3 date-picker.css. Copyright 2025 NextUI Inc.
|
||||
* Apache-2.0; see third-party/HEROUI-LICENSE. hv- namespace, Vue/Reka states. */
|
||||
|
||||
.hv-date-picker {
|
||||
@apply inline-flex flex-col gap-1;
|
||||
|
||||
.hv-date-input-group__suffix,
|
||||
.hv-date-input-group__prefix {
|
||||
@apply pointer-events-auto;
|
||||
}
|
||||
}
|
||||
|
||||
.hv-date-picker__trigger {
|
||||
@apply inline-flex w-full items-center rounded-field p-1 text-sm no-highlight;
|
||||
|
||||
cursor: var(--cursor-interactive);
|
||||
|
||||
/**
|
||||
* Transitions
|
||||
* CRITICAL: motion-reduce must be AFTER transition for correct override specificity
|
||||
*/
|
||||
transition: box-shadow 150ms var(--ease-out);
|
||||
@apply motion-reduce:transition-none;
|
||||
|
||||
&:focus-visible:not([data-focused]),
|
||||
&[data-focus-visible="true"] {
|
||||
@apply status-focused;
|
||||
}
|
||||
|
||||
&:disabled,
|
||||
&[data-disabled="true"],
|
||||
&[aria-disabled="true"] {
|
||||
@apply status-disabled;
|
||||
}
|
||||
}
|
||||
|
||||
.hv-date-picker__trigger-indicator {
|
||||
@apply inline-flex size-4 items-center justify-center text-field-placeholder;
|
||||
}
|
||||
|
||||
.hv-date-picker__popover {
|
||||
@apply w-fit origin-(--reka-popper-transform-origin) scrollbar-none overflow-y-auto overscroll-contain bg-overlay p-3;
|
||||
@apply motion-reduce:transition-none;
|
||||
|
||||
box-shadow: var(--overlay-shadow);
|
||||
border-radius: min(32px, calc(var(--radius) * 2.5));
|
||||
|
||||
&:focus-visible:not([data-focused]),
|
||||
&[data-focus-visible="true"] {
|
||||
@apply outline-none;
|
||||
}
|
||||
|
||||
&[data-entering="true"] {
|
||||
@apply animate-in duration-150 ease-smooth fade-in-0 zoom-in-95;
|
||||
|
||||
&[data-side^="top"] {
|
||||
@apply slide-in-from-bottom-1;
|
||||
}
|
||||
|
||||
&[data-side^="bottom"] {
|
||||
@apply slide-in-from-top-1;
|
||||
}
|
||||
|
||||
&[data-side^="left"] {
|
||||
@apply slide-in-from-right-1;
|
||||
}
|
||||
|
||||
&[data-side^="right"] {
|
||||
@apply slide-in-from-left-1;
|
||||
}
|
||||
}
|
||||
|
||||
&[data-exiting="true"] {
|
||||
@apply animate-out duration-100 ease-smooth zoom-out-95 fade-out;
|
||||
/* Stays non-interactive while closing, even if the exit animation is interrupted. */
|
||||
@apply pointer-events-none;
|
||||
}
|
||||
|
||||
&[data-exiting="true"],
|
||||
&[data-entering="true"] {
|
||||
@apply transition-[opacity,transform] will-change-[opacity,transform];
|
||||
}
|
||||
}
|
||||
|
||||
.hv-date-picker__popover .hv-calendar__nav-button-icon,
|
||||
.hv-date-picker__popover .hv-range-calendar__nav-button-icon {
|
||||
@apply rotate-0;
|
||||
}
|
||||
Reference in New Issue
Block a user