@refraction-ui/react 0.15.0 → 0.16.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6433,6 +6433,360 @@ var InstallPrompt = React11.forwardRef(
6433
6433
  );
6434
6434
  InstallPrompt.displayName = "InstallPrompt";
6435
6435
 
6436
+ // ../mascot/dist/index.js
6437
+ function getMascotMoodStyles(mood) {
6438
+ switch (mood) {
6439
+ case "happy":
6440
+ return {
6441
+ "--rfr-mascot-shell": "var(--primary, 138 60% 51%)",
6442
+ "--rfr-mascot-shell-rim": "var(--primary-700, 138 58% 36%)",
6443
+ "--rfr-mascot-belly": "var(--primary-200, 138 60% 83%)",
6444
+ "--rfr-mascot-skin": "var(--primary-400, 138 59% 63%)",
6445
+ "--rfr-mascot-skin-d": "var(--primary-600, 138 58% 43%)",
6446
+ "--rfr-mascot-scute": "var(--sunshine, 42 100% 62%)",
6447
+ "--rfr-mascot-scute-alt": "var(--primary-300, 138 59% 74%)",
6448
+ "--rfr-mascot-cheek": "var(--accent-solid, 26 100% 67%)"
6449
+ };
6450
+ case "think":
6451
+ return {
6452
+ // Indigo / purple tones
6453
+ "--rfr-mascot-shell": "250 65% 55%",
6454
+ "--rfr-mascot-shell-rim": "250 65% 40%",
6455
+ "--rfr-mascot-belly": "250 65% 85%",
6456
+ "--rfr-mascot-skin": "250 65% 72%",
6457
+ "--rfr-mascot-skin-d": "250 65% 62%",
6458
+ "--rfr-mascot-scute": "280 65% 60%",
6459
+ "--rfr-mascot-scute-alt": "280 65% 50%",
6460
+ "--rfr-mascot-cheek": "320 80% 65%"
6461
+ };
6462
+ case "wave":
6463
+ return {
6464
+ // Orange / warm tones
6465
+ "--rfr-mascot-shell": "24 85% 50%",
6466
+ "--rfr-mascot-shell-rim": "24 85% 40%",
6467
+ "--rfr-mascot-belly": "24 85% 85%",
6468
+ "--rfr-mascot-skin": "24 85% 68%",
6469
+ "--rfr-mascot-skin-d": "24 85% 58%",
6470
+ "--rfr-mascot-scute": "160 60% 45%",
6471
+ "--rfr-mascot-scute-alt": "160 60% 35%",
6472
+ "--rfr-mascot-cheek": "15 90% 65%"
6473
+ };
6474
+ }
6475
+ }
6476
+ function startMascotBlinkInterval(onBlinkChange, intervalMs = 4e3, durationMs = 150) {
6477
+ const timer = setInterval(() => {
6478
+ onBlinkChange(true);
6479
+ setTimeout(() => {
6480
+ onBlinkChange(false);
6481
+ }, durationMs);
6482
+ }, intervalMs);
6483
+ return () => {
6484
+ clearInterval(timer);
6485
+ };
6486
+ }
6487
+ function createMascot(props = {}) {
6488
+ const { mood = "happy", animation = "none", size = "md", animate = true } = props;
6489
+ const ariaProps = {
6490
+ role: "img",
6491
+ "aria-label": `Tobi the Tortoise feeling ${mood}`
6492
+ };
6493
+ const dataAttributes = {
6494
+ "data-slot": "mascot",
6495
+ "data-mood": mood,
6496
+ "data-animation": animation,
6497
+ "data-size": size,
6498
+ "data-animate": animate ? "true" : "false"
6499
+ };
6500
+ return {
6501
+ ariaProps,
6502
+ dataAttributes,
6503
+ state: {
6504
+ mood,
6505
+ animation,
6506
+ size,
6507
+ animate
6508
+ },
6509
+ style: getMascotMoodStyles(mood)
6510
+ };
6511
+ }
6512
+ var mascotVariants = cva({
6513
+ base: "inline-block select-none transition-all duration-300",
6514
+ variants: {
6515
+ size: {
6516
+ sm: "w-24 h-auto",
6517
+ md: "w-36 h-auto",
6518
+ lg: "w-48 h-auto",
6519
+ xl: "w-64 h-auto"
6520
+ },
6521
+ animation: {
6522
+ none: "",
6523
+ bounce: "motion-safe:animate-bounce",
6524
+ float: "rfr-mascot-float"
6525
+ }
6526
+ },
6527
+ defaultVariants: {
6528
+ size: "md",
6529
+ animation: "none"
6530
+ }
6531
+ });
6532
+ var Mascot = React11.forwardRef(
6533
+ ({
6534
+ mood = "happy",
6535
+ animation = "none",
6536
+ size = "md",
6537
+ animate = true,
6538
+ animateBobbing,
6539
+ animateBlinking,
6540
+ animateSprout,
6541
+ className,
6542
+ style,
6543
+ ...props
6544
+ }, ref) => {
6545
+ const [isBlinking, setIsBlinking] = React11.useState(false);
6546
+ const shouldBob = animateBobbing ?? animate;
6547
+ const shouldSway = animateSprout ?? animate;
6548
+ const shouldBlink = animateBlinking ?? animate;
6549
+ React11.useEffect(() => {
6550
+ if (!shouldBlink) {
6551
+ setIsBlinking(false);
6552
+ return;
6553
+ }
6554
+ const cleanup = startMascotBlinkInterval(setIsBlinking);
6555
+ return cleanup;
6556
+ }, [shouldBlink]);
6557
+ const api = createMascot({ mood, animation, size, animate });
6558
+ const combinedStyle = {
6559
+ ...api.style,
6560
+ ...style
6561
+ };
6562
+ return /* @__PURE__ */ jsxs(
6563
+ "svg",
6564
+ {
6565
+ ref,
6566
+ className: cn("mascot", mascotVariants({ size, animation }), className),
6567
+ viewBox: "0 0 340 300",
6568
+ xmlns: "http://www.w3.org/2000/svg",
6569
+ style: combinedStyle,
6570
+ ...api.ariaProps,
6571
+ ...api.dataAttributes,
6572
+ "data-blinking": isBlinking ? "true" : "false",
6573
+ "data-bobbing": shouldBob ? "true" : "false",
6574
+ "data-sprout": shouldSway ? "true" : "false",
6575
+ "data-waving": animate ? "true" : "false",
6576
+ ...props,
6577
+ children: [
6578
+ /* @__PURE__ */ jsx("defs", { children: /* @__PURE__ */ jsx("style", { children: `
6579
+ /* Base styles and fallback HSL values */
6580
+ svg.mascot {
6581
+ --primary: 138 60% 51%;
6582
+ --primary-200: 138 60% 83%;
6583
+ --primary-300: 138 59% 74%;
6584
+ --primary-400: 138 59% 63%;
6585
+ --primary-600: 138 58% 43%;
6586
+ --primary-700: 138 58% 36%;
6587
+ --primary-800: 138 58% 29%;
6588
+ --primary-900: 138 58% 22%;
6589
+ --primary-950: 139 59% 16%;
6590
+ --sunshine: 42 100% 62%;
6591
+ --accent-solid: 26 100% 67%;
6592
+
6593
+ fill: none;
6594
+ stroke-linecap: round;
6595
+ stroke-linejoin: round;
6596
+ }
6597
+
6598
+ /* Mapping elements to tokens */
6599
+ svg.mascot .shadow {
6600
+ fill: hsl(var(--primary-900) / 0.15);
6601
+ }
6602
+ svg.mascot .stem {
6603
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6604
+ stroke-width: 3px;
6605
+ fill: none;
6606
+ }
6607
+ svg.mascot .leaf {
6608
+ fill: hsl(var(--rfr-mascot-leaf, var(--primary-400)));
6609
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6610
+ stroke-width: 3px;
6611
+ }
6612
+ svg.mascot .skin-d {
6613
+ fill: hsl(var(--rfr-mascot-skin-d, var(--primary-400)));
6614
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6615
+ stroke-width: 3px;
6616
+ }
6617
+ svg.mascot .skin {
6618
+ fill: hsl(var(--rfr-mascot-skin, var(--primary-300)));
6619
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6620
+ stroke-width: 3px;
6621
+ }
6622
+ svg.mascot .shell-rim {
6623
+ fill: hsl(var(--rfr-mascot-shell-rim, var(--primary-800)));
6624
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6625
+ stroke-width: 3px;
6626
+ }
6627
+ svg.mascot .shell {
6628
+ fill: hsl(var(--rfr-mascot-shell, var(--primary-600)));
6629
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6630
+ stroke-width: 3px;
6631
+ }
6632
+ svg.mascot .belly {
6633
+ fill: hsl(var(--rfr-mascot-belly, var(--primary-200)));
6634
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6635
+ stroke-width: 3px;
6636
+ }
6637
+ svg.mascot .scute {
6638
+ fill: hsl(var(--rfr-mascot-scute, var(--primary-700)));
6639
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6640
+ stroke-width: 2.5px;
6641
+ }
6642
+ svg.mascot .scute.alt {
6643
+ fill: hsl(var(--rfr-mascot-scute-alt, var(--primary-800)));
6644
+ }
6645
+ svg.mascot .ln {
6646
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6647
+ stroke-width: 3px;
6648
+ fill: none;
6649
+ }
6650
+ svg.mascot .eye-w {
6651
+ fill: #ffffff;
6652
+ stroke: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6653
+ stroke-width: 3px;
6654
+ }
6655
+ svg.mascot .pupil {
6656
+ fill: hsl(var(--rfr-mascot-stroke, var(--primary-950)));
6657
+ }
6658
+ svg.mascot .glint {
6659
+ fill: #ffffff;
6660
+ }
6661
+ svg.mascot .cheek {
6662
+ fill: hsl(var(--rfr-mascot-cheek, var(--accent-solid)));
6663
+ }
6664
+
6665
+ /* Float Animation keyframes */
6666
+ @keyframes rfrMascotFloat {
6667
+ 0%, 100% {
6668
+ transform: translateY(0);
6669
+ }
6670
+ 50% {
6671
+ transform: translateY(-8px);
6672
+ }
6673
+ }
6674
+
6675
+ /* Sway/antenna animation keyframes */
6676
+ @keyframes rfrMascotSway {
6677
+ 0%, 100% {
6678
+ transform: rotate(0deg);
6679
+ }
6680
+ 50% {
6681
+ transform: rotate(4deg);
6682
+ }
6683
+ }
6684
+
6685
+ /* Waving animation keyframes */
6686
+ @keyframes rfrMascotWave {
6687
+ 0%, 100% {
6688
+ transform: rotate(0deg);
6689
+ }
6690
+ 50% {
6691
+ transform: rotate(-18deg);
6692
+ }
6693
+ }
6694
+
6695
+ /* Bounce animation keyframes */
6696
+ @keyframes rfrMascotBounce {
6697
+ 0%, 100% {
6698
+ transform: translateY(0) scaleY(1);
6699
+ }
6700
+ 50% {
6701
+ transform: translateY(-16px) scaleY(0.96);
6702
+ }
6703
+ }
6704
+
6705
+ /* Animation hook connections */
6706
+ .rfr-mascot-float[data-bobbing="true"] .m-bob {
6707
+ animation: rfrMascotFloat 3s ease-in-out infinite;
6708
+ }
6709
+ .rfr-mascot-float[data-sprout="true"] .m-sprout {
6710
+ animation: rfrMascotSway 3s ease-in-out infinite;
6711
+ transform-origin: 158px 92px;
6712
+ }
6713
+ .rfr-mascot-float[data-waving="true"] .m-wave {
6714
+ animation: rfrMascotWave 1.2s ease-in-out infinite;
6715
+ transform-origin: 250px 120px;
6716
+ }
6717
+
6718
+ .motion-safe\\:animate-bounce[data-bobbing="true"] .m-bob {
6719
+ animation: rfrMascotBounce 1.2s ease-in-out infinite;
6720
+ }
6721
+ .motion-safe\\:animate-bounce[data-sprout="true"] .m-sprout {
6722
+ animation: rfrMascotSway 1.2s ease-in-out infinite;
6723
+ transform-origin: 158px 92px;
6724
+ }
6725
+
6726
+ /* Stationary wave arm if not floating */
6727
+ .mascot:not(.rfr-mascot-float)[data-waving="true"] .m-wave {
6728
+ animation: rfrMascotWave 1.2s ease-in-out infinite;
6729
+ transform-origin: 250px 120px;
6730
+ }
6731
+ ` }) }),
6732
+ /* @__PURE__ */ jsx("ellipse", { className: "shadow", cx: "166", cy: "280", rx: "116", ry: "16" }),
6733
+ /* @__PURE__ */ jsxs("g", { className: "m-bob", children: [
6734
+ /* @__PURE__ */ jsxs("g", { className: "m-sprout", children: [
6735
+ /* @__PURE__ */ jsx("path", { className: "stem", d: "M158 92 C158 70 158 58 158 44" }),
6736
+ /* @__PURE__ */ jsx("path", { className: "leaf", d: "M158 56 C140 50 126 58 128 74 C146 76 158 70 158 56 Z" }),
6737
+ /* @__PURE__ */ jsx("path", { className: "leaf", d: "M158 50 C176 42 192 50 190 66 C172 70 158 64 158 50 Z" })
6738
+ ] }),
6739
+ /* @__PURE__ */ jsx("ellipse", { className: "skin-d", cx: "96", cy: "222", rx: "27", ry: "32" }),
6740
+ /* @__PURE__ */ jsx("ellipse", { className: "skin-d", cx: "214", cy: "224", rx: "27", ry: "32" }),
6741
+ /* @__PURE__ */ jsx("path", { className: "skin-d", d: "M58 176 C40 178 28 190 26 204 C44 206 60 196 66 182 Z" }),
6742
+ /* @__PURE__ */ jsx("path", { className: "shell-rim", d: "M36 196 C30 86 92 70 162 70 C232 70 294 86 288 196 C288 210 252 220 162 220 C72 220 36 210 36 196 Z" }),
6743
+ /* @__PURE__ */ jsx("path", { className: "shell", d: "M44 190 C40 92 96 78 162 78 C228 78 284 92 280 190 C280 200 246 206 162 206 C78 206 44 200 44 190 Z" }),
6744
+ /* @__PURE__ */ jsx("path", { className: "belly", d: "M50 192 C92 206 232 206 274 192 C274 202 240 210 162 210 C84 210 50 202 50 192 Z" }),
6745
+ /* @__PURE__ */ jsx("polygon", { className: "scute", points: "162,86 190,102 190,134 162,150 134,134 134,102" }),
6746
+ /* @__PURE__ */ jsx("polygon", { className: "scute alt", points: "162,150 186,162 186,184 162,196 138,184 138,162" }),
6747
+ /* @__PURE__ */ jsx("polygon", { className: "scute alt", points: "104,108 126,120 126,148 104,160 82,148 82,120" }),
6748
+ /* @__PURE__ */ jsx("polygon", { className: "scute alt", points: "220,108 242,120 242,148 220,160 198,148 198,120" }),
6749
+ /* @__PURE__ */ jsx("polygon", { className: "scute", points: "108,162 126,172 126,190 108,200 90,190 90,172" }),
6750
+ /* @__PURE__ */ jsx("polygon", { className: "scute", points: "216,162 234,172 234,190 216,200 198,190 198,172" }),
6751
+ /* @__PURE__ */ jsx("ellipse", { className: "skin", cx: "116", cy: "232", rx: "25", ry: "31" }),
6752
+ mood !== "wave" && /* @__PURE__ */ jsx("ellipse", { className: "skin", cx: "236", cy: "234", rx: "25", ry: "31" }),
6753
+ /* @__PURE__ */ jsx("path", { className: "ln", d: mood === "wave" ? "M104 250 H128" : "M104 250 H128 M224 252 H248", opacity: 0.4 }),
6754
+ mood === "wave" && /* @__PURE__ */ jsxs("g", { className: "m-wave", children: [
6755
+ /* @__PURE__ */ jsx("ellipse", { className: "skin", cx: "250", cy: "120", rx: "15", ry: "22" }),
6756
+ /* @__PURE__ */ jsx("path", { className: "ln", d: "M244 104 Q250 96 256 104", opacity: 0.4 })
6757
+ ] }),
6758
+ /* @__PURE__ */ jsx("path", { className: "skin", d: "M262 150 C276 142 296 142 310 150 L312 176 C300 188 274 188 262 178 Z" }),
6759
+ /* @__PURE__ */ jsx("ellipse", { className: "skin", cx: "296", cy: "156", rx: "40", ry: "36" }),
6760
+ /* @__PURE__ */ jsx("ellipse", { className: "cheek", cx: "280", cy: "174", rx: "11", ry: "8" }),
6761
+ isBlinking ? /* @__PURE__ */ jsxs("g", { className: "mascot-face-blinking", children: [
6762
+ /* @__PURE__ */ jsx("path", { className: "ln", d: "M275 150 C280 155 292 155 297 150" }),
6763
+ /* @__PURE__ */ jsx("path", { className: "ln", d: "M304 152 C309 157 319 157 324 152" }),
6764
+ mood === "think" ? /* @__PURE__ */ jsx("path", { className: "ln", d: "M280 174 Q290 169 298 175" }) : /* @__PURE__ */ jsx("path", { className: "ln", d: "M286 172 C294 180 306 180 314 171" })
6765
+ ] }) : mood === "think" ? /* @__PURE__ */ jsxs("g", { className: "mascot-face-think", children: [
6766
+ /* @__PURE__ */ jsx("ellipse", { className: "eye-w", cx: "286", cy: "150", rx: "11", ry: "13" }),
6767
+ /* @__PURE__ */ jsx("ellipse", { className: "eye-w", cx: "314", cy: "152", rx: "10", ry: "12" }),
6768
+ /* @__PURE__ */ jsx("circle", { className: "pupil", cx: "288", cy: "146", r: 5.5 }),
6769
+ /* @__PURE__ */ jsx("circle", { className: "pupil", cx: "315", cy: "148", r: 5 }),
6770
+ /* @__PURE__ */ jsx("circle", { className: "glint", cx: "290", cy: "143", r: 1.9 }),
6771
+ /* @__PURE__ */ jsx("circle", { className: "glint", cx: "317", cy: "145", r: 1.7 }),
6772
+ /* @__PURE__ */ jsx("path", { className: "ln", d: "M280 174 Q290 169 298 175" })
6773
+ ] }) : /* @__PURE__ */ jsxs("g", { className: "mascot-face-happy", children: [
6774
+ /* @__PURE__ */ jsx("ellipse", { className: "eye-w", cx: "286", cy: "150", rx: "11", ry: "13" }),
6775
+ /* @__PURE__ */ jsx("ellipse", { className: "eye-w", cx: "314", cy: "152", rx: "10", ry: "12" }),
6776
+ /* @__PURE__ */ jsx("circle", { className: "pupil", cx: "289", cy: "152", r: 5.5 }),
6777
+ /* @__PURE__ */ jsx("circle", { className: "pupil", cx: "316", cy: "154", r: 5 }),
6778
+ /* @__PURE__ */ jsx("circle", { className: "glint", cx: "291", cy: "149", r: 1.9 }),
6779
+ /* @__PURE__ */ jsx("circle", { className: "glint", cx: "318", cy: "151", r: 1.7 }),
6780
+ /* @__PURE__ */ jsx("path", { className: "ln", d: "M286 172 C294 180 306 180 314 171" })
6781
+ ] })
6782
+ ] })
6783
+ ]
6784
+ }
6785
+ );
6786
+ }
6787
+ );
6788
+ Mascot.displayName = "Mascot";
6789
+
6436
6790
  // ../mobile-nav/dist/index.js
6437
6791
  function createMobileNav(props = {}) {
6438
6792
  const isOpen = props.open ?? false;
@@ -11270,7 +11624,11 @@ var Avatar2 = React11.forwardRef(
11270
11624
  Avatar2.displayName = "Avatar";
11271
11625
  var AvatarImage = React11.forwardRef(
11272
11626
  ({ className, src, alt = "", onLoad, onError, ...props }, ref) => {
11273
- const { setImageLoaded, setImageError } = React11.useContext(AvatarContext);
11627
+ const { imageError, setImageLoaded, setImageError } = React11.useContext(AvatarContext);
11628
+ React11.useEffect(() => {
11629
+ setImageLoaded(false);
11630
+ setImageError(false);
11631
+ }, [src, setImageLoaded, setImageError]);
11274
11632
  const handleLoad = (e) => {
11275
11633
  setImageLoaded(true);
11276
11634
  onLoad?.(e);
@@ -11279,6 +11637,7 @@ var AvatarImage = React11.forwardRef(
11279
11637
  setImageError(true);
11280
11638
  onError?.(e);
11281
11639
  };
11640
+ if (imageError) return null;
11282
11641
  return /* @__PURE__ */ jsx(
11283
11642
  "img",
11284
11643
  {
@@ -11296,7 +11655,8 @@ var AvatarImage = React11.forwardRef(
11296
11655
  AvatarImage.displayName = "AvatarImage";
11297
11656
  var AvatarFallback = React11.forwardRef(
11298
11657
  ({ className, children, ...props }, ref) => {
11299
- const { size } = React11.useContext(AvatarContext);
11658
+ const { size, imageLoaded, imageError } = React11.useContext(AvatarContext);
11659
+ if (imageLoaded && !imageError) return null;
11300
11660
  return /* @__PURE__ */ jsx(
11301
11661
  "span",
11302
11662
  {
@@ -14696,6 +15056,20 @@ var CarouselContent = React11.forwardRef(
14696
15056
  }
14697
15057
  );
14698
15058
  CarouselContent.displayName = "CarouselContent";
15059
+ var Slider = React11.forwardRef(
15060
+ ({ className, variant, ...props }, ref) => {
15061
+ return /* @__PURE__ */ jsx(
15062
+ "input",
15063
+ {
15064
+ type: "range",
15065
+ ref,
15066
+ className: `w-full ${className || ""}`,
15067
+ ...props
15068
+ }
15069
+ );
15070
+ }
15071
+ );
15072
+ Slider.displayName = "Slider";
14699
15073
  var Pagination = React11.forwardRef(
14700
15074
  ({ className, ...props }, ref) => {
14701
15075
  return /* @__PURE__ */ jsx("div", { ref, className: cn("", className), ...props });
@@ -21870,6 +22244,552 @@ var AudienceFeatureCard = React11.forwardRef(({ kicker, title, body, footer, cla
21870
22244
  });
21871
22245
  AudienceFeatureCard.displayName = "AudienceFeatureCard";
21872
22246
 
21873
- export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AudienceFeatureCard, AudioRoom, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, BrandNetworkCell, Breadcrumbs, BrowserChromeMock, Button, CATEGORY_LABELS, CURSOR_COLORS, Calendar, CalendarHeader, CallControlButton, CallControls, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chat, Checkbox, Checklist, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ConfirmationCard, ContentProtection, CookieConsent, Cursor, DEFAULT_CATEGORIES, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EditorStatusBar, EditorTabs, EmojiPicker, EmptyState, FeedbackButton, FeedbackDialog, FileTree, FileUpload, FloatingReactions, FlowEditor, Footer, GraphView, IconSystem, InfiniteCanvas, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KeyboardShortcut, LanguageSelector, LinkCard, LiveCaptions, LiveCursors, LiveTranscript, MarkdownRenderer, MarqueeStrip, MasteryBar, MiniMap, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, NumberedSteps, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, PasswordInput, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PreCallLobby, PresenceIndicator, PricingCard, ProgressBar, RadialGauge, RadioGroup, RadioItem, RatingScale, ReactionBar, ReactionBurst, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, STICKY_NOTE_COLORS, SearchBar, SearchResultItem, SearchResults, SectionHead, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectItem, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, SocialAuthButton, SocialAuthRow, SpeakingOrb, StatGrid, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, StickyNote, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Terminal, TestResults, Textarea, ThreadView, Timeline, TimelineItem, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoGrid, VideoPlayer, VideoTile, VoicePill, Waveform, Wizard, altHintState, animatedTextVariants, assignCursorColor, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createConsoleSink, createConversation, createCookieConsent, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createPreCallLobby, createSegmentedControl, createSilentSamples, createTelemetry, createVoicePill, createWaveform, dayVariants, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, getNextSegmentIndex, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, micLevelToBars, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, nextStickyColor, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchResultVariants, segmentedControlItemVariants, segmentedControlVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statColumns, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAnalytics, useAuth, useConversation, useCookieConsent, useFloatingReactions, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, useWizard, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
22247
+ // ../sortable-list/dist/index.js
22248
+ function reorder(items, from, to) {
22249
+ const len = items.length;
22250
+ if (len === 0 || from < 0 || from >= len || to < 0 || to >= len || from === to) {
22251
+ return [...items];
22252
+ }
22253
+ const result = [...items];
22254
+ const [moved] = result.splice(from, 1);
22255
+ result.splice(to, 0, moved);
22256
+ return result;
22257
+ }
22258
+ function getNextOrderIndex(current, key, count) {
22259
+ if (count <= 0) return current;
22260
+ const clamped = Math.max(0, Math.min(current, count - 1));
22261
+ switch (key) {
22262
+ case "ArrowUp":
22263
+ case "ArrowLeft":
22264
+ return Math.max(0, clamped - 1);
22265
+ case "ArrowDown":
22266
+ case "ArrowRight":
22267
+ return Math.min(count - 1, clamped + 1);
22268
+ case "Home":
22269
+ return 0;
22270
+ case "End":
22271
+ return count - 1;
22272
+ default:
22273
+ return clamped;
22274
+ }
22275
+ }
22276
+ function createSortableList() {
22277
+ return {
22278
+ ariaProps: {
22279
+ role: "list"
22280
+ },
22281
+ dataAttributes: {
22282
+ "data-component": "sortable-list"
22283
+ }
22284
+ };
22285
+ }
22286
+ var sortableListVariants = cva({
22287
+ base: "flex flex-col gap-1 w-full",
22288
+ variants: {
22289
+ disabled: {
22290
+ true: "opacity-50 pointer-events-none",
22291
+ false: ""
22292
+ }
22293
+ },
22294
+ defaultVariants: {
22295
+ disabled: "false"
22296
+ }
22297
+ });
22298
+ var sortableListRowVariants = cva({
22299
+ base: [
22300
+ "flex items-center gap-3 rounded-md border border-border bg-card px-3 py-2",
22301
+ "transition-opacity"
22302
+ ].join(" "),
22303
+ variants: {
22304
+ dragging: {
22305
+ true: "opacity-50 ring-2 ring-ring",
22306
+ false: ""
22307
+ }
22308
+ },
22309
+ defaultVariants: {
22310
+ dragging: "false"
22311
+ }
22312
+ });
22313
+ var sortableListGripClass = "cursor-grab text-muted-foreground shrink-0 flex items-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background rounded";
22314
+ var sortableListContentClass = "flex-1 min-w-0";
22315
+ function SortableListInner({
22316
+ items,
22317
+ getKey,
22318
+ renderItem,
22319
+ onReorder,
22320
+ disabled = false,
22321
+ className,
22322
+ ...props
22323
+ }, ref) {
22324
+ const dragFromRef = React11.useRef(null);
22325
+ const [draggingIndex, setDraggingIndex] = React11.useState(null);
22326
+ const { ariaProps, dataAttributes } = createSortableList();
22327
+ const handleDragStart = (index) => (event) => {
22328
+ if (disabled) {
22329
+ event.preventDefault();
22330
+ return;
22331
+ }
22332
+ dragFromRef.current = index;
22333
+ setDraggingIndex(index);
22334
+ event.dataTransfer.effectAllowed = "move";
22335
+ event.dataTransfer.setData("text/plain", String(index));
22336
+ };
22337
+ const handleDragOver = (event) => {
22338
+ event.preventDefault();
22339
+ event.dataTransfer.dropEffect = "move";
22340
+ };
22341
+ const handleDragEnter = (toIndex) => (event) => {
22342
+ event.preventDefault();
22343
+ if (disabled || dragFromRef.current === null || dragFromRef.current === toIndex) return;
22344
+ const next = reorder(items, dragFromRef.current, toIndex);
22345
+ dragFromRef.current = toIndex;
22346
+ setDraggingIndex(toIndex);
22347
+ onReorder?.(next);
22348
+ };
22349
+ const handleDrop = (event) => {
22350
+ event.preventDefault();
22351
+ };
22352
+ const handleDragEnd = () => {
22353
+ dragFromRef.current = null;
22354
+ setDraggingIndex(null);
22355
+ };
22356
+ const handleGripKeyDown = (index) => (event) => {
22357
+ if (disabled) return;
22358
+ const next = getNextOrderIndex(index, event.key, items.length);
22359
+ if (next !== index) {
22360
+ event.preventDefault();
22361
+ onReorder?.(reorder(items, index, next));
22362
+ }
22363
+ };
22364
+ return /* @__PURE__ */ jsx(
22365
+ "div",
22366
+ {
22367
+ ref,
22368
+ className: cn(sortableListVariants({ disabled: disabled ? "true" : "false" }), className),
22369
+ ...ariaProps,
22370
+ ...dataAttributes,
22371
+ ...props,
22372
+ children: items.map((item, index) => {
22373
+ const key = getKey(item, index);
22374
+ const isDragging = draggingIndex === index;
22375
+ const dragHandleProps = {
22376
+ "aria-label": "Reorder item",
22377
+ role: "button",
22378
+ tabIndex: 0,
22379
+ onKeyDown: handleGripKeyDown(index),
22380
+ onDragStart: handleDragStart(index)
22381
+ };
22382
+ return /* @__PURE__ */ jsxs(
22383
+ "div",
22384
+ {
22385
+ role: "listitem",
22386
+ draggable: !disabled,
22387
+ className: sortableListRowVariants({ dragging: isDragging ? "true" : "false" }),
22388
+ onDragOver: handleDragOver,
22389
+ onDragEnter: handleDragEnter(index),
22390
+ onDrop: handleDrop,
22391
+ onDragEnd: handleDragEnd,
22392
+ children: [
22393
+ /* @__PURE__ */ jsx(
22394
+ "button",
22395
+ {
22396
+ type: "button",
22397
+ "aria-label": dragHandleProps["aria-label"],
22398
+ role: dragHandleProps.role,
22399
+ tabIndex: dragHandleProps.tabIndex,
22400
+ onKeyDown: dragHandleProps.onKeyDown,
22401
+ onDragStart: dragHandleProps.onDragStart,
22402
+ className: sortableListGripClass,
22403
+ draggable: !disabled,
22404
+ disabled,
22405
+ children: /* @__PURE__ */ jsx(
22406
+ "svg",
22407
+ {
22408
+ width: "16",
22409
+ height: "16",
22410
+ viewBox: "0 0 16 16",
22411
+ fill: "none",
22412
+ "aria-hidden": "true",
22413
+ children: /* @__PURE__ */ jsx(
22414
+ "path",
22415
+ {
22416
+ d: `M2 4h12M2 8h12M2 12h12`,
22417
+ stroke: "currentColor",
22418
+ strokeWidth: "1.5",
22419
+ strokeLinecap: "round"
22420
+ }
22421
+ )
22422
+ }
22423
+ )
22424
+ }
22425
+ ),
22426
+ /* @__PURE__ */ jsx("div", { className: sortableListContentClass, children: renderItem(item, { index, dragHandleProps }) })
22427
+ ]
22428
+ },
22429
+ key
22430
+ );
22431
+ })
22432
+ }
22433
+ );
22434
+ }
22435
+ var SortableList = React11.forwardRef(SortableListInner);
22436
+ SortableList.displayName = "SortableList";
22437
+
22438
+ // ../kanban-board/dist/index.js
22439
+ function createKanbanBoard() {
22440
+ return {
22441
+ ariaProps: {
22442
+ role: "group",
22443
+ "aria-label": "Board"
22444
+ },
22445
+ dataAttributes: {
22446
+ "data-component": "kanban-board"
22447
+ }
22448
+ };
22449
+ }
22450
+ function cardsByColumn(cards, getColumnId, columns) {
22451
+ const map = /* @__PURE__ */ new Map();
22452
+ for (const col of columns) {
22453
+ map.set(col.id, []);
22454
+ }
22455
+ for (const card of cards) {
22456
+ const colId = getColumnId(card);
22457
+ const bucket = map.get(colId);
22458
+ if (bucket !== void 0) {
22459
+ bucket.push(card);
22460
+ }
22461
+ }
22462
+ return map;
22463
+ }
22464
+ function visibleAndOverflow(cards, cap = 5) {
22465
+ if (cards.length <= cap) {
22466
+ return { visible: cards, overflow: 0 };
22467
+ }
22468
+ return { visible: cards.slice(0, cap), overflow: cards.length - cap };
22469
+ }
22470
+ var kanbanBoardVariants = cva({
22471
+ base: "flex flex-row gap-4 overflow-x-auto pb-4",
22472
+ variants: {},
22473
+ defaultVariants: {}
22474
+ });
22475
+ var kanbanColumnVariants = cva({
22476
+ base: "flex flex-col min-w-[260px] max-w-[300px] flex-shrink-0 rounded-xl bg-muted/40",
22477
+ variants: {},
22478
+ defaultVariants: {}
22479
+ });
22480
+ var kanbanColumnHeaderClass = "flex items-center gap-2 px-4 pt-4 pb-2";
22481
+ var kanbanColumnTitleClass = "flex-1 text-sm font-semibold text-foreground truncate";
22482
+ var kanbanColumnCountClass = "ml-auto inline-flex items-center justify-center rounded-full bg-muted px-2 py-0.5 text-xs font-medium text-muted-foreground";
22483
+ var kanbanAccentBarClass = "h-0.5 w-full";
22484
+ var kanbanNoteBarClass = "mx-4 mb-2 rounded-md bg-muted px-3 py-1.5 text-xs text-muted-foreground";
22485
+ var kanbanColumnBodyClass = "flex flex-col gap-2 px-3 pb-3";
22486
+ var kanbanOverflowButtonClass = [
22487
+ "mt-1 w-full rounded-lg border border-dashed border-border",
22488
+ "py-1.5 text-center text-xs text-muted-foreground",
22489
+ "transition-colors hover:bg-muted hover:text-foreground",
22490
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2"
22491
+ ].join(" ");
22492
+ var kanbanCardVariants = cva({
22493
+ base: "rounded-lg border border-border bg-card p-3 text-sm text-foreground",
22494
+ variants: {
22495
+ clickable: {
22496
+ true: "cursor-pointer transition-colors hover:bg-muted/60",
22497
+ false: ""
22498
+ }
22499
+ },
22500
+ defaultVariants: {
22501
+ clickable: "false"
22502
+ }
22503
+ });
22504
+ var KanbanCard = React11.forwardRef(
22505
+ ({ accent, clickable = false, className, style, children, ...props }, ref) => {
22506
+ const accentStyle = accent ? { borderTopColor: accent, borderTopWidth: "2px", ...style } : style ?? {};
22507
+ return /* @__PURE__ */ jsx(
22508
+ "div",
22509
+ {
22510
+ ref,
22511
+ className: cn(
22512
+ kanbanCardVariants({ clickable: clickable ? "true" : "false" }),
22513
+ className
22514
+ ),
22515
+ style: accentStyle,
22516
+ ...props,
22517
+ children
22518
+ }
22519
+ );
22520
+ }
22521
+ );
22522
+ KanbanCard.displayName = "KanbanCard";
22523
+ var KanbanColumn = React11.forwardRef(
22524
+ ({ def, count, className, children, style, ...props }, ref) => {
22525
+ const derivedCount = count !== void 0 ? count : React11.Children.count(children);
22526
+ const colStyle = def.accent ? { "--kanban-accent": def.accent, ...style } : style ?? {};
22527
+ return /* @__PURE__ */ jsxs(
22528
+ "div",
22529
+ {
22530
+ ref,
22531
+ className: cn(kanbanColumnVariants(), className),
22532
+ style: colStyle,
22533
+ ...props,
22534
+ children: [
22535
+ /* @__PURE__ */ jsxs("div", { className: kanbanColumnHeaderClass, children: [
22536
+ /* @__PURE__ */ jsx("span", { className: kanbanColumnTitleClass, children: def.title }),
22537
+ /* @__PURE__ */ jsx("span", { className: kanbanColumnCountClass, children: derivedCount })
22538
+ ] }),
22539
+ /* @__PURE__ */ jsx(
22540
+ "div",
22541
+ {
22542
+ className: kanbanAccentBarClass,
22543
+ style: def.accent ? { backgroundColor: "var(--kanban-accent)" } : { backgroundColor: "transparent" },
22544
+ "aria-hidden": "true"
22545
+ }
22546
+ ),
22547
+ def.note && /* @__PURE__ */ jsx("p", { className: kanbanNoteBarClass, children: def.note }),
22548
+ /* @__PURE__ */ jsx("div", { className: kanbanColumnBodyClass, children })
22549
+ ]
22550
+ }
22551
+ );
22552
+ }
22553
+ );
22554
+ KanbanColumn.displayName = "KanbanColumn";
22555
+ function KanbanBoard({
22556
+ columns,
22557
+ cards,
22558
+ getCardColumnId,
22559
+ getCardKey,
22560
+ renderCard,
22561
+ cardCap = 5,
22562
+ onCardClick: _onCardClick,
22563
+ columnHeader,
22564
+ onShowMore,
22565
+ className,
22566
+ ...props
22567
+ }) {
22568
+ const { ariaProps, dataAttributes } = createKanbanBoard();
22569
+ const buckets = cardsByColumn(cards, getCardColumnId, columns);
22570
+ return /* @__PURE__ */ jsx(
22571
+ "div",
22572
+ {
22573
+ className: cn(kanbanBoardVariants(), className),
22574
+ ...ariaProps,
22575
+ ...dataAttributes,
22576
+ ...props,
22577
+ children: columns.map((def) => {
22578
+ const colCards = buckets.get(def.id) ?? [];
22579
+ const { visible, overflow } = visibleAndOverflow(colCards, cardCap);
22580
+ const count = colCards.length;
22581
+ const header = columnHeader ? columnHeader(def, count) : null;
22582
+ return /* @__PURE__ */ jsxs(
22583
+ "div",
22584
+ {
22585
+ className: kanbanColumnVariants(),
22586
+ style: def.accent ? { "--kanban-accent": def.accent } : void 0,
22587
+ children: [
22588
+ header ?? /* @__PURE__ */ jsxs("div", { className: kanbanColumnHeaderClass, children: [
22589
+ /* @__PURE__ */ jsx("span", { className: kanbanColumnTitleClass, children: def.title }),
22590
+ /* @__PURE__ */ jsx("span", { className: kanbanColumnCountClass, children: count })
22591
+ ] }),
22592
+ /* @__PURE__ */ jsx(
22593
+ "div",
22594
+ {
22595
+ className: kanbanAccentBarClass,
22596
+ style: def.accent ? { backgroundColor: "var(--kanban-accent)" } : { backgroundColor: "transparent" },
22597
+ "aria-hidden": "true"
22598
+ }
22599
+ ),
22600
+ def.note && /* @__PURE__ */ jsx("p", { className: kanbanNoteBarClass, children: def.note }),
22601
+ /* @__PURE__ */ jsxs("div", { className: kanbanColumnBodyClass, children: [
22602
+ visible.map((card) => /* @__PURE__ */ jsx(React11.Fragment, { children: renderCard(card, def) }, getCardKey(card))),
22603
+ overflow > 0 && /* @__PURE__ */ jsx(
22604
+ "button",
22605
+ {
22606
+ type: "button",
22607
+ className: kanbanOverflowButtonClass,
22608
+ onClick: () => onShowMore?.(def.id),
22609
+ children: `+${overflow} more`
22610
+ }
22611
+ )
22612
+ ] })
22613
+ ]
22614
+ },
22615
+ def.id
22616
+ );
22617
+ })
22618
+ }
22619
+ );
22620
+ }
22621
+
22622
+ // ../slot-picker/dist/index.js
22623
+ function slotsForDay(slotsByDay, dayId) {
22624
+ return slotsByDay[dayId] ?? [];
22625
+ }
22626
+ function isSlotSelected(value, dayId, slot) {
22627
+ return value?.dayId === dayId && value?.slot === slot;
22628
+ }
22629
+ function createSlotPicker() {
22630
+ return {
22631
+ ariaProps: {
22632
+ role: "group",
22633
+ "aria-label": "Pick a time"
22634
+ },
22635
+ dataAttributes: {
22636
+ "data-component": "slot-picker"
22637
+ }
22638
+ };
22639
+ }
22640
+ var slotPickerVariants = cva({
22641
+ base: "flex flex-col gap-4",
22642
+ variants: {},
22643
+ defaultVariants: {}
22644
+ });
22645
+ var slotPickerDayRowClass = "flex items-center gap-2 overflow-x-auto pb-1";
22646
+ var slotPickerDayVariants = cva({
22647
+ base: [
22648
+ "inline-flex flex-col items-center justify-center rounded-lg px-3 py-2 min-w-[3.5rem]",
22649
+ "text-sm font-medium cursor-pointer transition-colors",
22650
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background",
22651
+ "disabled:pointer-events-none disabled:opacity-50"
22652
+ ].join(" "),
22653
+ variants: {
22654
+ selected: {
22655
+ true: "bg-primary text-primary-foreground",
22656
+ false: "bg-card border border-input text-foreground hover:bg-muted"
22657
+ }
22658
+ },
22659
+ defaultVariants: {
22660
+ selected: "false"
22661
+ }
22662
+ });
22663
+ var slotPickerGridClass = "grid grid-cols-3 gap-2 sm:grid-cols-4";
22664
+ var slotPickerSlotVariants = cva({
22665
+ base: [
22666
+ "inline-flex items-center justify-center rounded-md border px-3 py-2 text-sm font-medium",
22667
+ "transition-colors cursor-pointer",
22668
+ "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background"
22669
+ ].join(" "),
22670
+ variants: {
22671
+ selected: {
22672
+ true: "bg-primary text-primary-foreground border-primary",
22673
+ false: "bg-card border-input text-foreground hover:bg-muted"
22674
+ },
22675
+ disabled: {
22676
+ true: "opacity-40 pointer-events-none",
22677
+ false: ""
22678
+ }
22679
+ },
22680
+ defaultVariants: {
22681
+ selected: "false",
22682
+ disabled: "false"
22683
+ }
22684
+ });
22685
+ var slotPickerSectionLabelClass = "text-sm font-semibold text-foreground";
22686
+ var slotPickerTimezoneClass = "text-xs text-muted-foreground ml-2";
22687
+ var SlotPicker = React11.forwardRef(
22688
+ ({
22689
+ days,
22690
+ slotsByDay,
22691
+ value: valueProp,
22692
+ defaultValue,
22693
+ onChange,
22694
+ timezoneLabel,
22695
+ disabledSlots = [],
22696
+ className,
22697
+ ...props
22698
+ }, ref) => {
22699
+ const isControlled = valueProp !== void 0;
22700
+ const [internal, setInternal] = React11.useState(
22701
+ defaultValue
22702
+ );
22703
+ const value = isControlled ? valueProp : internal;
22704
+ const selectedDayId = value?.dayId;
22705
+ const handleDaySelect = React11.useCallback(
22706
+ (dayId) => {
22707
+ const slots = slotsForDay(slotsByDay, dayId);
22708
+ const keepSlot = value?.slot && slots.includes(value.slot) ? value.slot : void 0;
22709
+ const next = keepSlot ? { dayId, slot: keepSlot } : void 0;
22710
+ if (!isControlled) setInternal(next);
22711
+ if (next) onChange?.(next);
22712
+ },
22713
+ [isControlled, onChange, slotsByDay, value]
22714
+ );
22715
+ const handleSlotSelect = React11.useCallback(
22716
+ (slot) => {
22717
+ if (!selectedDayId) return;
22718
+ const next = { dayId: selectedDayId, slot };
22719
+ if (!isControlled) setInternal(next);
22720
+ onChange?.(next);
22721
+ },
22722
+ [isControlled, onChange, selectedDayId]
22723
+ );
22724
+ const api = createSlotPicker();
22725
+ const currentSlots = selectedDayId ? slotsForDay(slotsByDay, selectedDayId) : [];
22726
+ return /* @__PURE__ */ jsxs(
22727
+ "div",
22728
+ {
22729
+ ref,
22730
+ className: cn(slotPickerVariants(), className),
22731
+ ...api.ariaProps,
22732
+ ...api.dataAttributes,
22733
+ ...props,
22734
+ children: [
22735
+ /* @__PURE__ */ jsxs("div", { children: [
22736
+ /* @__PURE__ */ jsx("p", { className: slotPickerSectionLabelClass, children: "Pick a day" }),
22737
+ /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-label": "Pick a day", className: cn(slotPickerDayRowClass, "mt-2"), children: days.map((day) => {
22738
+ const isSelected = selectedDayId === day.id;
22739
+ return /* @__PURE__ */ jsxs(
22740
+ "button",
22741
+ {
22742
+ type: "button",
22743
+ role: "radio",
22744
+ "aria-checked": isSelected,
22745
+ "data-state": isSelected ? "checked" : "unchecked",
22746
+ className: slotPickerDayVariants({
22747
+ selected: isSelected ? "true" : "false"
22748
+ }),
22749
+ onClick: () => handleDaySelect(day.id),
22750
+ children: [
22751
+ /* @__PURE__ */ jsx("span", { className: "text-xs", children: day.weekday }),
22752
+ /* @__PURE__ */ jsx("span", { className: "text-base font-bold leading-none", children: day.dayNum })
22753
+ ]
22754
+ },
22755
+ day.id
22756
+ );
22757
+ }) })
22758
+ ] }),
22759
+ selectedDayId && /* @__PURE__ */ jsxs("div", { children: [
22760
+ /* @__PURE__ */ jsxs("p", { className: slotPickerSectionLabelClass, children: [
22761
+ "Pick a time",
22762
+ timezoneLabel && /* @__PURE__ */ jsx("span", { className: slotPickerTimezoneClass, children: timezoneLabel })
22763
+ ] }),
22764
+ /* @__PURE__ */ jsx("div", { role: "radiogroup", "aria-label": "Pick a time", className: cn(slotPickerGridClass, "mt-2"), children: currentSlots.map((slot) => {
22765
+ const isSelected = isSlotSelected(value, selectedDayId, slot);
22766
+ const isDisabled = disabledSlots.includes(slot);
22767
+ return /* @__PURE__ */ jsx(
22768
+ "button",
22769
+ {
22770
+ type: "button",
22771
+ role: "radio",
22772
+ "aria-checked": isSelected,
22773
+ "aria-disabled": isDisabled || void 0,
22774
+ "data-state": isSelected ? "checked" : "unchecked",
22775
+ className: slotPickerSlotVariants({
22776
+ selected: isSelected ? "true" : "false",
22777
+ disabled: isDisabled ? "true" : "false"
22778
+ }),
22779
+ onClick: () => !isDisabled && handleSlotSelect(slot),
22780
+ children: slot
22781
+ },
22782
+ slot
22783
+ );
22784
+ }) })
22785
+ ] })
22786
+ ]
22787
+ }
22788
+ );
22789
+ }
22790
+ );
22791
+ SlotPicker.displayName = "SlotPicker";
22792
+
22793
+ export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AltHintState, AnalyticsProvider, AnimatedText, AppShell, AudienceFeatureCard, AudioRoom, AuthGuard, AuthProvider, Avatar2 as Avatar, AvatarFallback, AvatarGroup, AvatarImage, Badge, BadgeDisplay, BottomNav, BrandNetworkCell, Breadcrumbs, BrowserChromeMock, Button, CATEGORY_LABELS, CURSOR_COLORS, Calendar, CalendarHeader, CallControlButton, CallControls, Callout, CalloutContent, CalloutDescription, CalloutIcon, CalloutTitle, Card, CardContent, CardDescription, CardFooter, CardGrid, CardHeader, CardTitle, Carousel, CarouselContent, CarouselItem, CarouselTrigger, Chat, Checkbox, Checklist, CodeBlock, CodeBlockContent, CodeBlockHeader, CodeEditor, Collapsible, CollapsibleContent, CollapsibleTrigger, Combobox, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, ComboboxTrigger, Command, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, Composer, ConfirmationCard, ContentProtection, CookieConsent, Cursor, DEFAULT_CATEGORIES, DEFAULT_VOICE_PILL_POSITION, DEFAULT_VOICE_PILL_SPEAKER, DEFAULT_WAVEFORM_BAR_COUNT, DEFAULT_WAVEFORM_COLOR, DEFAULT_WAVEFORM_HEIGHT, DEFAULT_WAVEFORM_INTENSITY, DEFAULT_WAVEFORM_SMOOTHING, DataTable, DatePicker, DeviceFrame, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, EMOJI_CATEGORIES, EMOJI_DATA, EditorStatusBar, EditorTabs, EmojiPicker, EmptyState, FeedbackButton, FeedbackDialog, FileTree, FileUpload, FloatingReactions, FlowEditor, Footer, GraphView, IconSystem, InfiniteCanvas, InlineEditor, Input, InputGroup, InputGroupAddon, InputGroupButton, InputGroupText, InstallPrompt, KanbanBoard, KanbanCard, KanbanColumn, KeyboardShortcut, LanguageSelector, LinkCard, LiveCaptions, LiveCursors, LiveTranscript, MarkdownRenderer, MarqueeStrip, Mascot, MasteryBar, MiniMap, MobileNav, MobileNavContent, MobileNavLink, MobileNavTrigger, Navbar, NumberedSteps, OtpInput, STATUS_COLORS as PRESENCE_STATUS_COLORS, STATUS_LABELS as PRESENCE_STATUS_LABELS, Pagination, PasswordInput, Payment, Popover, PopoverClose, PopoverContent, PopoverTrigger, PreCallLobby, PresenceIndicator, PricingCard, ProgressBar, RadialGauge, RadioGroup, RadioItem, RatingScale, ReactionBar, ReactionBurst, ResizableDivider, ResizableLayout, ResizablePane, SANE_DEFAULTS, STATUS_INDICATOR_COLORS as STATUS_COLORS, STATUS_INDICATOR_LABELS as STATUS_LABELS, STICKY_NOTE_COLORS, SearchBar, SearchResultItem, SearchResults, SectionHead, SegmentedControl, SegmentedControlItem, Select, SelectContent, SelectItem, SelectTrigger, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetTitle, SheetTrigger, ShortcutBadge, ShortcutContext, ShortcutHint, ShortcutProvider, ShortcutRegistry, Sidebar, Skeleton, SkeletonText, SkipToContent, SlideViewer, Slider, SlotPicker, SocialAuthButton, SocialAuthRow, SortableList, SpeakingOrb, StatGrid, StatsGrid, StatusIndicator, Step, StepContent, StepDescription, StepIndicator, StepTitle, Steps, StickyNote, Switch, TableOfContents, Tabs, TabsContent, TabsList, TabsTrigger, TelemetryErrorBoundary, TelemetryProvider, Terminal, TestResults, Textarea, ThreadView, Timeline, TimelineItem, Toast, ToastProvider, Toaster, Tooltip, TooltipContent, TooltipTrigger, TypewriterText, VersionSelector, VideoGrid, VideoPlayer, VideoTile, VoicePill, Waveform, Wizard, altHintState, animatedTextVariants, assignCursorColor, avatarFallbackVariants, avatarImageVariants, avatarTokens, avatarVariants, badgeGridVariants, badgeItemVariants, badgeVariants, bottomNavTabVariants, bottomNavVariants, breadcrumbItemVariants, breadcrumbSeparatorStyles, breadcrumbsVariants, buttonTokens, buttonVariants, calendarVariants, canAccessAdmin, canAccessReviewer, cardContentVariants, cardDescriptionVariants, cardFooterVariants, cardHeaderVariants, cardTitleVariants, cardTokens, cardVariants, cellVariants, checkIconPath, checkboxTokens, checkboxVariants, clampVoicePillIntensity, codeEditorTokens, codeEditorVariants, collapsibleContentVariants, comboboxContentVariants, comboboxEmptyVariants, comboboxInputVariants, comboboxItemVariants, comboboxListVariants, comboboxTriggerVariants, commandGroupVariants, commandInputVariants, commandItemVariants, commandVariants, contentProtectionVariants, controlsVariants, createAnalytics, createAppInsightsSink, createConsoleSink, createConversation, createCookieConsent, createGA4ClientSdkSink, createGA4HttpSink, createGA4Sink, createIntensitySamples, createPostHogClientSdkSink, createPostHogHttpSink, createPostHogSink, createPreCallLobby, createSegmentedControl, createSilentSamples, createTelemetry, createVoicePill, createWaveform, dayVariants, deviceFrameVariants, dialogContentVariants, drawWaveform, editorVariants, emojiPickerContainerStyles, emojiPickerEmojiButtonStyles, emojiPickerGridStyles, feedbackDialogVariants, fileUploadDropZoneVariants, fileUploadFileItemStyles, fileUploadFileListStyles, findMessage, footerVariants, formatFileSize, formatRelativeTime, formatShortcut, formatTimestamp, getAssignableRoles, getDefaultPortal, getInitials, getNextSegmentIndex, getReplyCount, getVoicePillAriaLabel, getVoicePillInitials, getVoicePillPosition, getVoicePillPulseStyle, getVoicePillSpeakerKey, getVoicePillSpeakerLabel, getWaveformPeak, globalShortcutRegistry, hasAllRoles, hasAnyRole, hasRole, headerVariants, indeterminateIconPath, inputGroupAddonVariants, inputGroupButtonVariants, inputGroupTokens, inputGroupVariants, inputVariants, installPromptVariants, isWaveformSampleInput, latestBadgeVariants, markdownRendererTokens, menuContentVariants, menuItemVariants, micLevelToBars, mobileNavContentVariants, mobileNavLinkVariants, mobileNavTokens, mobileNavTriggerVariants, mobileNavVariants, navLinkVariants, navbarVariants, nextStickyColor, normalizeBarCount, normalizeIntensity, normalizeSmoothing, normalizeWaveformConfig, normalizeWaveformSamples, optionVariants, otpInputContainerVariants, otpInputSlotVariants, otpInputTokens, overlayStyles, overlayVariants, playerVariants, popoverContentVariants, prepareWaveformCanvas, previewVariants, progressBarVariants, proseVariants, radioCircleVariants, radioGroupVariants, radioItemVariants, reactionAddButtonStyles, reactionBarStyles, reactionCountStyles, reactionEmojiStyles, reactionPillVariants, resampleWaveformSamples, resizableDividerVariants, resizableLayoutTokens, resizableLayoutVariants, resizablePaneVariants, rootIdOf, rowVariants, scaleWaveformSamples, searchBarVariants, searchResultVariants, segmentedControlItemVariants, segmentedControlVariants, selectContentVariants, selectItemVariants, selectMainTimeline, selectReplies, selectRoots, selectThreadMessages, selectTimelineFromState, selectTokens, selectTriggerVariants, selectorVariants, sheetContentVariants, sheetOverlayStyles, shortcutBadgeStyles, shortcutKeyStyles, shortcutSeparatorStyles, sidebarItemVariants, sidebarVariants, skeletonVariants, slideTypeBadgeVariants, slideViewerProgressBarVariants, slideViewerTokens, slideViewerVariants, smoothWaveformSamples, startSessionReplay, statCardVariants, statColumns, statsGridVariants, statusContainerStyles, statusDotVariants, statusLabelStyles, statusPulseVariants, switchThumbVariants, switchTokens, switchVariants, tableVariants, tabsListVariants, tabsTriggerVariants, textareaVariants, threadAuthorStyles, threadAvatarStyles, threadBodyStyles, threadContainerStyles, threadContentStyles, threadMessageStyles, threadReactionsStyles, threadTimestampStyles, toCssDimension, toastVariants, toolbarVariants, tooltipContentVariants, typewriterVariants, useAnalytics, useAuth, useConversation, useCookieConsent, useFloatingReactions, useLogger, useShortcut, useSpan, useTelemetry, useToast, useTrackEvent, useWizard, versionSelectorOptionVariants, versionSelectorVariants, voicePillAvatarStyles, voicePillAvatarWrapStyles, voicePillLabelStyles, voicePillMuteButtonStyles, voicePillPositionVariants, voicePillPulseRingStyles, voicePillRootStyles, voicePillSpeakerStyles, voicePillSubStyles, voicePillTextStyles, voicePillTokens, watermarkVariants, waveformCanvasVariants, waveformVariants };
21874
22794
  //# sourceMappingURL=index.js.map
21875
22795
  //# sourceMappingURL=index.js.map