@stanfordspezi/spezi-web-design-system
Version:
Stanford Biodesign Digital Health Spezi Web Design System
32 lines (31 loc) • 1.08 kB
JavaScript
import { jsxs as a, jsx as r } from "react/jsx-runtime";
import { c as s } from "./index-2NvaPZWc.mjs";
import { B as i } from "./Button-nH76KtOO.mjs";
import "react";
import { i as m, f as c, C as l } from "./Calendar-lRSZF8zv.mjs";
import { e as n, g as d, b as f } from "./Popover-B_eTNIg4.mjs";
import u from "./calendar-RXGrd-Je.mjs";
const k = (e) => {
const { showTimePicker: o } = e, t = e.mode !== void 0 ? e.selected : null;
return /* @__PURE__ */ a(n, { children: [
/* @__PURE__ */ r(d, { asChild: !0, children: /* @__PURE__ */ a(
i,
{
"data-slot": "date-picker",
variant: "outline",
className: s(
"bg-surface-primary! w-full! justify-start! text-left! text-sm!",
!t && "text-muted-foreground!"
),
children: [
/* @__PURE__ */ r(u, { className: "size-4" }),
t && m(t) ? c(t, `PPP${o ? " - p" : ""}`) : "Pick a date"
]
}
) }),
/* @__PURE__ */ r(f, { className: "w-auto! p-0!", children: /* @__PURE__ */ r(l, { ...e }) })
] });
};
export {
k as D
};