@pactor-app/ui 1.9.0 → 1.11.0

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.
@@ -141,7 +141,7 @@ import {
141
141
  chartColor,
142
142
  navigationMenuTriggerStyle,
143
143
  toast
144
- } from "./chunk-VT5XP4U4.js";
144
+ } from "./chunk-NVORKHWX.js";
145
145
  import {
146
146
  Dialog,
147
147
  DialogContent,
@@ -153,7 +153,7 @@ import {
153
153
  DrawerContent,
154
154
  DrawerHeader,
155
155
  DrawerTitle
156
- } from "./chunk-F42SGQNW.js";
156
+ } from "./chunk-XUHJ5YSG.js";
157
157
  import {
158
158
  Accordion,
159
159
  AccordionContent,
@@ -325,13 +325,38 @@ function Badge2({ text, variant = "default", className, style }) {
325
325
 
326
326
  // src/components/components/Breadcrumb/index.tsx
327
327
  import { Fragment } from "react";
328
+
329
+ // src/components/spa-link.ts
330
+ import { useRenderer as useRenderer3 } from "@pactor-app/runtime";
331
+ function shouldInterceptLinkClick(event, href, target) {
332
+ return typeof href === "string" && href.startsWith("/") && (target === void 0 || target === "_self") && event.button === 0 && !event.metaKey && !event.ctrlKey && !event.shiftKey && !event.altKey;
333
+ }
334
+ function useSpaLinkClick() {
335
+ const { context } = useRenderer3();
336
+ return (event, href, target) => {
337
+ if (shouldInterceptLinkClick(event, href, target)) {
338
+ event.preventDefault();
339
+ context.route.navigate(href);
340
+ }
341
+ };
342
+ }
343
+
344
+ // src/components/components/Breadcrumb/index.tsx
328
345
  import { jsx as jsx8, jsxs as jsxs5 } from "react/jsx-runtime";
329
346
  function Breadcrumb2({ items = [], className, style }) {
347
+ const handleSpaClick = useSpaLinkClick();
330
348
  return /* @__PURE__ */ jsx8(Breadcrumb, { className, style, children: /* @__PURE__ */ jsx8(BreadcrumbList, { children: items.map((item, index) => {
331
349
  const isLast = index === items.length - 1;
332
350
  return /* @__PURE__ */ jsxs5(Fragment, { children: [
333
351
  index > 0 ? /* @__PURE__ */ jsx8(BreadcrumbSeparator, {}) : null,
334
- /* @__PURE__ */ jsx8(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ jsx8(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx8(BreadcrumbLink, { href: item.href, children: item.label }) })
352
+ /* @__PURE__ */ jsx8(BreadcrumbItem, { children: isLast || !item.href ? /* @__PURE__ */ jsx8(BreadcrumbPage, { children: item.label }) : /* @__PURE__ */ jsx8(
353
+ BreadcrumbLink,
354
+ {
355
+ href: item.href,
356
+ onClick: (event) => handleSpaClick(event, item.href),
357
+ children: item.label
358
+ }
359
+ ) })
335
360
  ] }, `${item.label}-${index}`);
336
361
  }) }) });
337
362
  }
@@ -353,6 +378,7 @@ var sizeMap = {
353
378
  };
354
379
  function Button2({
355
380
  text,
381
+ icon,
356
382
  variant = "default",
357
383
  danger,
358
384
  size = "middle",
@@ -381,7 +407,7 @@ function Button2({
381
407
  className
382
408
  ),
383
409
  children: [
384
- loading ? /* @__PURE__ */ jsx9(Loader2, { "aria-hidden": true, className: "animate-spin" }) : null,
410
+ loading ? /* @__PURE__ */ jsx9(Loader2, { "aria-hidden": true, className: "animate-spin" }) : icon ? /* @__PURE__ */ jsx9(Icon, { name: icon, size: "sm" }) : null,
385
411
  text ?? children
386
412
  ]
387
413
  }
@@ -499,7 +525,7 @@ function Card2({ title, bordered = true, rounded, className, style, children })
499
525
  }
500
526
 
501
527
  // src/components/components/Carousel/index.tsx
502
- import { useRenderer as useRenderer3 } from "@pactor-app/runtime";
528
+ import { useRenderer as useRenderer4 } from "@pactor-app/runtime";
503
529
  import { useEffect as useEffect2, useState as useState2 } from "react";
504
530
  import { jsx as jsx13, jsxs as jsxs9 } from "react/jsx-runtime";
505
531
  function isDslNode(item) {
@@ -512,7 +538,7 @@ function Carousel2({
512
538
  className,
513
539
  style
514
540
  }) {
515
- const { renderChildren } = useRenderer3();
541
+ const { renderChildren } = useRenderer4();
516
542
  const [api, setApi] = useState2();
517
543
  useEffect2(() => {
518
544
  if (!api || !autoplay) return;
@@ -890,7 +916,7 @@ function Chart({
890
916
  }
891
917
 
892
918
  // src/components/components/ChatInput/index.tsx
893
- import { useRenderer as useRenderer4 } from "@pactor-app/runtime";
919
+ import { useRenderer as useRenderer5 } from "@pactor-app/runtime";
894
920
  import { ArrowUp } from "lucide-react";
895
921
  import {
896
922
  useRef,
@@ -912,7 +938,7 @@ function ChatInput({
912
938
  className,
913
939
  style
914
940
  }) {
915
- const { renderChildren } = useRenderer4();
941
+ const { renderChildren } = useRenderer5();
916
942
  const controlled = value !== void 0;
917
943
  const [draft, setDraft] = useState5("");
918
944
  const text = controlled ? value : draft;
@@ -1032,7 +1058,7 @@ function ContextMenu2({
1032
1058
  }
1033
1059
 
1034
1060
  // src/components/components/DataTable/index.tsx
1035
- import { useI18n as useI18n3, useRenderer as useRenderer5 } from "@pactor-app/runtime";
1061
+ import { useI18n as useI18n3, useRenderer as useRenderer6 } from "@pactor-app/runtime";
1036
1062
  import { ArrowDown, ArrowUp as ArrowUp2, ArrowUpDown } from "lucide-react";
1037
1063
  import { useMemo, useState as useState6 } from "react";
1038
1064
  import { jsx as jsx22, jsxs as jsxs17 } from "react/jsx-runtime";
@@ -1062,7 +1088,7 @@ function DataTable({
1062
1088
  className,
1063
1089
  style
1064
1090
  }) {
1065
- const { renderChildren } = useRenderer5();
1091
+ const { renderChildren } = useRenderer6();
1066
1092
  const { t } = useI18n3();
1067
1093
  const [sortState, setSortState] = useState6(sort);
1068
1094
  const [filters, setFilters] = useState6({});
@@ -1484,7 +1510,7 @@ function DatePicker(props) {
1484
1510
  }
1485
1511
 
1486
1512
  // src/components/components/Dialog/index.tsx
1487
- import { useRenderer as useRenderer6 } from "@pactor-app/runtime";
1513
+ import { useRenderer as useRenderer7 } from "@pactor-app/runtime";
1488
1514
  import { useState as useState8 } from "react";
1489
1515
  import { jsx as jsx24, jsxs as jsxs19 } from "react/jsx-runtime";
1490
1516
  function Dialog2({
@@ -1497,7 +1523,7 @@ function Dialog2({
1497
1523
  className,
1498
1524
  style
1499
1525
  }) {
1500
- const { renderChildren } = useRenderer6();
1526
+ const { renderChildren } = useRenderer7();
1501
1527
  const [innerOpen, setInnerOpen] = useState8(false);
1502
1528
  const controlled = open !== void 0;
1503
1529
  const visible = controlled ? open : innerOpen;
@@ -1611,9 +1637,15 @@ function Empty2({ title, description, children, className, style }) {
1611
1637
 
1612
1638
  // src/components/components/Field/index.tsx
1613
1639
  import { jsx as jsx28, jsxs as jsxs23 } from "react/jsx-runtime";
1614
- function Field2({ label, description, error, children, className, style }) {
1640
+ function Field2({ label, required, description, error, children, className, style }) {
1615
1641
  return /* @__PURE__ */ jsxs23(Field, { className, style, children: [
1616
- label ? /* @__PURE__ */ jsx28(FieldLabel, { children: label }) : null,
1642
+ label ? /* @__PURE__ */ jsxs23(FieldLabel, { children: [
1643
+ required ? /* @__PURE__ */ jsxs23("span", { "aria-hidden": true, className: "text-destructive", children: [
1644
+ "*",
1645
+ " "
1646
+ ] }) : null,
1647
+ label
1648
+ ] }) : null,
1617
1649
  children,
1618
1650
  description ? /* @__PURE__ */ jsx28(FieldDescription, { children: description }) : null,
1619
1651
  error ? /* @__PURE__ */ jsx28(FieldError, { match: true, children: error }) : null
@@ -1688,7 +1720,7 @@ function Footer({ className, style, children }) {
1688
1720
  }
1689
1721
 
1690
1722
  // src/components/components/Form/index.tsx
1691
- import { useRenderer as useRenderer7 } from "@pactor-app/runtime";
1723
+ import { useRenderer as useRenderer8 } from "@pactor-app/runtime";
1692
1724
  import {
1693
1725
  useCallback,
1694
1726
  useEffect as useEffect6,
@@ -1710,7 +1742,7 @@ function Form({
1710
1742
  onSubmit,
1711
1743
  onValuesChange
1712
1744
  }) {
1713
- const { context } = useRenderer7();
1745
+ const { context } = useRenderer8();
1714
1746
  const [values, setValues] = useState9(() => ({
1715
1747
  ...initialValues
1716
1748
  }));
@@ -2020,13 +2052,13 @@ function HeaderLocalesArea({
2020
2052
  }
2021
2053
 
2022
2054
  // src/components/components/HoverCard/index.tsx
2023
- import { useRenderer as useRenderer8 } from "@pactor-app/runtime";
2055
+ import { useRenderer as useRenderer9 } from "@pactor-app/runtime";
2024
2056
  import { jsx as jsx34, jsxs as jsxs25 } from "react/jsx-runtime";
2025
2057
  function isDslNode2(value) {
2026
2058
  return typeof value === "object" && value !== null && typeof value.type === "string";
2027
2059
  }
2028
2060
  function HoverCard2({ content, children, className, style }) {
2029
- const { renderChildren } = useRenderer8();
2061
+ const { renderChildren } = useRenderer9();
2030
2062
  return /* @__PURE__ */ jsxs25(HoverCard, { children: [
2031
2063
  /* @__PURE__ */ jsx34(HoverCardTrigger, { render: triggerWrapper("hover-card-trigger-wrap"), children }),
2032
2064
  /* @__PURE__ */ jsx34(HoverCardContent, { className, style, children: isDslNode2(content) ? renderChildren([content]) : content })
@@ -2048,6 +2080,7 @@ function Input2({
2048
2080
  allowClear,
2049
2081
  onChange,
2050
2082
  className,
2083
+ controlClassName,
2051
2084
  style
2052
2085
  }) {
2053
2086
  const form = useFormContext();
@@ -2079,7 +2112,10 @@ function Input2({
2079
2112
  value: currentValue,
2080
2113
  placeholder,
2081
2114
  disabled,
2082
- className: !inFormRoot && allowClear !== true ? className : void 0,
2115
+ className: cn(
2116
+ !inFormRoot && allowClear !== true && className,
2117
+ allowClear !== true && controlClassName
2118
+ ),
2083
2119
  style: !inFormRoot && allowClear !== true ? style : void 0,
2084
2120
  onChange: (event) => {
2085
2121
  if (inForm && form && name) {
@@ -2102,7 +2138,11 @@ function Input2({
2102
2138
  const control = allowClear === true ? /* @__PURE__ */ jsxs26(
2103
2139
  "span",
2104
2140
  {
2105
- className: cn("flex items-center gap-1", !inFormRoot && className),
2141
+ className: cn(
2142
+ "flex items-center gap-1",
2143
+ !inFormRoot && className,
2144
+ controlClassName
2145
+ ),
2106
2146
  style: inFormRoot ? void 0 : style,
2107
2147
  children: [
2108
2148
  input,
@@ -2212,7 +2252,7 @@ function InputOTP2({
2212
2252
  }
2213
2253
 
2214
2254
  // src/components/components/Item/index.tsx
2215
- import { useRenderer as useRenderer9 } from "@pactor-app/runtime";
2255
+ import { useRenderer as useRenderer10 } from "@pactor-app/runtime";
2216
2256
  import { jsx as jsx38, jsxs as jsxs28 } from "react/jsx-runtime";
2217
2257
  function Item2({
2218
2258
  title,
@@ -2222,7 +2262,7 @@ function Item2({
2222
2262
  className,
2223
2263
  style
2224
2264
  }) {
2225
- const { renderChildren } = useRenderer9();
2265
+ const { renderChildren } = useRenderer10();
2226
2266
  const mediaNodes = media === void 0 ? [] : Array.isArray(media) ? media : [media];
2227
2267
  return /* @__PURE__ */ jsxs28(Item, { className, style, children: [
2228
2268
  mediaNodes.length > 0 ? /* @__PURE__ */ jsx38(ItemMedia, { children: renderChildren(mediaNodes) }) : null,
@@ -2248,10 +2288,10 @@ function Label2({ text, htmlFor, className, style }) {
2248
2288
 
2249
2289
  // src/components/components/Layout/index.tsx
2250
2290
  import { isDslSourceRef } from "@pactor-app/core";
2251
- import { useRenderer as useRenderer10 } from "@pactor-app/runtime";
2291
+ import { useRenderer as useRenderer11 } from "@pactor-app/runtime";
2252
2292
  import { jsx as jsx41 } from "react/jsx-runtime";
2253
2293
  function Layout({ direction, className, style, dslChildren }) {
2254
- const { renderChildren, context } = useRenderer10();
2294
+ const { renderChildren, context } = useRenderer11();
2255
2295
  const hasSider = Array.isArray(dslChildren) ? dslChildren.some(
2256
2296
  (child) => !isDslSourceRef(child) && resolveRootType(child, context) === "Sider"
2257
2297
  ) : false;
@@ -2282,6 +2322,7 @@ function resolveRootType(node, context) {
2282
2322
  // src/components/components/Link/index.tsx
2283
2323
  import { jsx as jsx42 } from "react/jsx-runtime";
2284
2324
  function Link({ href, text, target, className, style, children }) {
2325
+ const handleSpaClick = useSpaLinkClick();
2285
2326
  return /* @__PURE__ */ jsx42(
2286
2327
  "a",
2287
2328
  {
@@ -2291,6 +2332,7 @@ function Link({ href, text, target, className, style, children }) {
2291
2332
  rel: target === "_blank" ? "noreferrer" : void 0,
2292
2333
  className: cn("text-primary underline-offset-4 hover:underline", className),
2293
2334
  style,
2335
+ onClick: (event) => handleSpaClick(event, href, target),
2294
2336
  children: text ?? children
2295
2337
  }
2296
2338
  );
@@ -2443,13 +2485,13 @@ function Pagination2({
2443
2485
  }
2444
2486
 
2445
2487
  // src/components/components/Popover/index.tsx
2446
- import { useRenderer as useRenderer11 } from "@pactor-app/runtime";
2488
+ import { useRenderer as useRenderer12 } from "@pactor-app/runtime";
2447
2489
  import { jsx as jsx47, jsxs as jsxs33 } from "react/jsx-runtime";
2448
2490
  function isDslNode3(value) {
2449
2491
  return typeof value === "object" && value !== null && typeof value.type === "string";
2450
2492
  }
2451
2493
  function Popover2({ content, children, className, style }) {
2452
- const { renderChildren } = useRenderer11();
2494
+ const { renderChildren } = useRenderer12();
2453
2495
  return /* @__PURE__ */ jsxs33(Popover, { children: [
2454
2496
  /* @__PURE__ */ jsx47(
2455
2497
  PopoverTrigger,
@@ -2513,6 +2555,7 @@ function RadioGroup2({
2513
2555
  label,
2514
2556
  rules,
2515
2557
  options = [],
2558
+ direction = "vertical",
2516
2559
  value,
2517
2560
  disabled,
2518
2561
  onChange,
@@ -2544,10 +2587,14 @@ function RadioGroup2({
2544
2587
  onValueChange: handleChange,
2545
2588
  disabled,
2546
2589
  name: inForm ? name : void 0,
2547
- className: cn(!inForm && className),
2590
+ className: cn(
2591
+ direction === "horizontal" && "flex flex-wrap items-center gap-x-6 gap-y-2",
2592
+ !inForm && className
2593
+ ),
2548
2594
  style: inForm ? void 0 : style,
2549
2595
  children: options.map((option, index) => {
2550
2596
  const optionId = `${controlId}-${index}`;
2597
+ const optionDisabled = disabled || option.disabled;
2551
2598
  return /* @__PURE__ */ jsxs35("span", { className: "inline-flex items-center gap-2", children: [
2552
2599
  /* @__PURE__ */ jsx50(
2553
2600
  RadioGroupItem,
@@ -2557,7 +2604,17 @@ function RadioGroup2({
2557
2604
  disabled: option.disabled
2558
2605
  }
2559
2606
  ),
2560
- /* @__PURE__ */ jsx50("label", { htmlFor: optionId, className: "text-sm leading-none font-medium", children: option.label })
2607
+ /* @__PURE__ */ jsx50(
2608
+ "label",
2609
+ {
2610
+ htmlFor: optionId,
2611
+ className: cn(
2612
+ "text-sm leading-none font-medium",
2613
+ optionDisabled ? "cursor-not-allowed opacity-50" : "cursor-pointer"
2614
+ ),
2615
+ children: option.label
2616
+ }
2617
+ )
2561
2618
  ] }, String(option.value));
2562
2619
  })
2563
2620
  }
@@ -2579,7 +2636,7 @@ function RadioGroup2({
2579
2636
  }
2580
2637
 
2581
2638
  // src/components/components/Resizable/index.tsx
2582
- import { useRenderer as useRenderer12 } from "@pactor-app/runtime";
2639
+ import { useRenderer as useRenderer13 } from "@pactor-app/runtime";
2583
2640
  import { Fragment as Fragment4 } from "react";
2584
2641
  import { jsx as jsx51, jsxs as jsxs36 } from "react/jsx-runtime";
2585
2642
  function Resizable({
@@ -2588,7 +2645,7 @@ function Resizable({
2588
2645
  className,
2589
2646
  style
2590
2647
  }) {
2591
- const { renderChildren } = useRenderer12();
2648
+ const { renderChildren } = useRenderer13();
2592
2649
  return /* @__PURE__ */ jsx51(PanelGroup, { orientation: direction, className, style, children: panels.map((panel, index) => /* @__PURE__ */ jsxs36(Fragment4, { children: [
2593
2650
  index > 0 ? /* @__PURE__ */ jsx51(ResizableHandle, { withHandle: true }) : null,
2594
2651
  /* @__PURE__ */ jsx51(
@@ -2637,6 +2694,7 @@ function Select2({
2637
2694
  allowClear,
2638
2695
  onChange,
2639
2696
  className,
2697
+ controlClassName,
2640
2698
  style
2641
2699
  }) {
2642
2700
  const form = useFormContext();
@@ -2662,7 +2720,11 @@ function Select2({
2662
2720
  const select = /* @__PURE__ */ jsxs37(
2663
2721
  "span",
2664
2722
  {
2665
- className: cn("inline-flex items-center gap-1", !inFormRoot && className),
2723
+ className: cn(
2724
+ "inline-flex items-center gap-1",
2725
+ !inFormRoot && className,
2726
+ controlClassName
2727
+ ),
2666
2728
  style: inFormRoot ? void 0 : style,
2667
2729
  children: [
2668
2730
  /* @__PURE__ */ jsxs37(
@@ -2900,11 +2962,11 @@ function Slider2({
2900
2962
  }
2901
2963
 
2902
2964
  // src/components/components/Sonner/index.tsx
2903
- import { useRenderer as useRenderer13 } from "@pactor-app/runtime";
2965
+ import { useRenderer as useRenderer14 } from "@pactor-app/runtime";
2904
2966
  import { useEffect as useEffect12 } from "react";
2905
2967
  import { jsx as jsx59 } from "react/jsx-runtime";
2906
2968
  function Sonner({ className, style }) {
2907
- const { context } = useRenderer13();
2969
+ const { context } = useRenderer14();
2908
2970
  useEffect12(() => {
2909
2971
  const { actions } = context;
2910
2972
  if (actions.has("toast")) {
@@ -3015,7 +3077,7 @@ function Switch2({
3015
3077
  }
3016
3078
 
3017
3079
  // src/components/components/Table/index.tsx
3018
- import { useI18n as useI18n8, useRenderer as useRenderer14 } from "@pactor-app/runtime";
3080
+ import { useI18n as useI18n8, useRenderer as useRenderer15 } from "@pactor-app/runtime";
3019
3081
  import { useState as useState12 } from "react";
3020
3082
  import { jsx as jsx63, jsxs as jsxs43 } from "react/jsx-runtime";
3021
3083
  function renderCellValue2(value) {
@@ -3037,7 +3099,7 @@ function Table2({
3037
3099
  className,
3038
3100
  style
3039
3101
  }) {
3040
- const { renderChildren } = useRenderer14();
3102
+ const { renderChildren } = useRenderer15();
3041
3103
  const { t } = useI18n8();
3042
3104
  const [current, setCurrent] = useState12(1);
3043
3105
  const pageSize = pagination === false ? void 0 : pagination?.pageSize;
@@ -3104,10 +3166,10 @@ function Table2({
3104
3166
  }
3105
3167
 
3106
3168
  // src/components/components/Tabs/index.tsx
3107
- import { useRenderer as useRenderer15 } from "@pactor-app/runtime";
3169
+ import { useRenderer as useRenderer16 } from "@pactor-app/runtime";
3108
3170
  import { jsx as jsx64, jsxs as jsxs44 } from "react/jsx-runtime";
3109
3171
  function Tabs2({ items = [], activeKey, variant, onChange, className, style }) {
3110
- const { renderChildren } = useRenderer15();
3172
+ const { renderChildren } = useRenderer16();
3111
3173
  return /* @__PURE__ */ jsxs44(
3112
3174
  Tabs,
3113
3175
  {
@@ -306,6 +306,7 @@ function Badge({
306
306
 
307
307
  // src/ui/breadcrumb.tsx
308
308
  import { ChevronRightIcon, MoreHorizontalIcon } from "lucide-react";
309
+ import * as React from "react";
309
310
  import { jsx as jsx6, jsxs as jsxs2 } from "react/jsx-runtime";
310
311
  function Breadcrumb({ ...props }) {
311
312
  return /* @__PURE__ */ jsx6("nav", { "aria-label": "breadcrumb", "data-slot": "breadcrumb", ...props });
@@ -333,12 +334,27 @@ function BreadcrumbItem({ className, ...props }) {
333
334
  }
334
335
  );
335
336
  }
336
- function BreadcrumbLink({ className, ...props }) {
337
+ function BreadcrumbLink({
338
+ className,
339
+ render,
340
+ ...props
341
+ }) {
342
+ const linkClassName = cn("transition-colors hover:text-foreground", className);
343
+ if (render) {
344
+ return React.cloneElement(render, {
345
+ "data-slot": "breadcrumb-link",
346
+ ...props,
347
+ className: cn(
348
+ linkClassName,
349
+ render.props.className
350
+ )
351
+ });
352
+ }
337
353
  return /* @__PURE__ */ jsx6(
338
354
  "a",
339
355
  {
340
356
  "data-slot": "breadcrumb-link",
341
- className: cn("transition-colors hover:text-foreground", className),
357
+ className: linkClassName,
342
358
  ...props
343
359
  }
344
360
  );
@@ -485,11 +501,11 @@ function Calendar({
485
501
  // src/ui/carousel.tsx
486
502
  import useEmblaCarousel from "embla-carousel-react";
487
503
  import { ChevronLeftIcon as ChevronLeftIcon2, ChevronRightIcon as ChevronRightIcon3 } from "lucide-react";
488
- import * as React from "react";
504
+ import * as React2 from "react";
489
505
  import { jsx as jsx9, jsxs as jsxs3 } from "react/jsx-runtime";
490
- var CarouselContext = React.createContext(null);
506
+ var CarouselContext = React2.createContext(null);
491
507
  function useCarousel() {
492
- const context = React.useContext(CarouselContext);
508
+ const context = React2.useContext(CarouselContext);
493
509
  if (!context) {
494
510
  throw new Error("useCarousel must be used within a <Carousel />");
495
511
  }
@@ -508,16 +524,16 @@ function Carousel({
508
524
  { ...opts, axis: orientation === "horizontal" ? "x" : "y" },
509
525
  plugins
510
526
  );
511
- const [canScrollPrev, setCanScrollPrev] = React.useState(false);
512
- const [canScrollNext, setCanScrollNext] = React.useState(false);
513
- const onSelect = React.useCallback((carouselApi) => {
527
+ const [canScrollPrev, setCanScrollPrev] = React2.useState(false);
528
+ const [canScrollNext, setCanScrollNext] = React2.useState(false);
529
+ const onSelect = React2.useCallback((carouselApi) => {
514
530
  if (!carouselApi) return;
515
531
  setCanScrollPrev(carouselApi.canScrollPrev());
516
532
  setCanScrollNext(carouselApi.canScrollNext());
517
533
  }, []);
518
- const scrollPrev = React.useCallback(() => api?.scrollPrev(), [api]);
519
- const scrollNext = React.useCallback(() => api?.scrollNext(), [api]);
520
- const handleKeyDown = React.useCallback(
534
+ const scrollPrev = React2.useCallback(() => api?.scrollPrev(), [api]);
535
+ const scrollNext = React2.useCallback(() => api?.scrollNext(), [api]);
536
+ const handleKeyDown = React2.useCallback(
521
537
  (event) => {
522
538
  if (event.key === "ArrowLeft") {
523
539
  event.preventDefault();
@@ -529,10 +545,10 @@ function Carousel({
529
545
  },
530
546
  [scrollPrev, scrollNext]
531
547
  );
532
- React.useEffect(() => {
548
+ React2.useEffect(() => {
533
549
  if (api && setApi) setApi(api);
534
550
  }, [api, setApi]);
535
- React.useEffect(() => {
551
+ React2.useEffect(() => {
536
552
  if (!api) return;
537
553
  onSelect(api);
538
554
  api.on("reInit", onSelect);
@@ -1423,7 +1439,7 @@ function InputGroupInput({
1423
1439
  // src/ui/input-otp.tsx
1424
1440
  import { OTPInput, OTPInputContext } from "input-otp";
1425
1441
  import { MinusIcon } from "lucide-react";
1426
- import * as React2 from "react";
1442
+ import * as React3 from "react";
1427
1443
  import { jsx as jsx23, jsxs as jsxs8 } from "react/jsx-runtime";
1428
1444
  function InputOTP({
1429
1445
  className,
@@ -1458,7 +1474,7 @@ function InputOTPSlot({
1458
1474
  className,
1459
1475
  ...props
1460
1476
  }) {
1461
- const inputOTPContext = React2.useContext(OTPInputContext);
1477
+ const inputOTPContext = React3.useContext(OTPInputContext);
1462
1478
  const { char, hasFakeCaret, isActive } = inputOTPContext?.slots[index] ?? {};
1463
1479
  return /* @__PURE__ */ jsxs8(
1464
1480
  "div",
@@ -2561,9 +2577,9 @@ function Toggle({
2561
2577
  // src/ui/toggle-group.tsx
2562
2578
  import { Toggle as TogglePrimitive2 } from "@base-ui/react/toggle";
2563
2579
  import { ToggleGroup as ToggleGroupPrimitive } from "@base-ui/react/toggle-group";
2564
- import * as React3 from "react";
2580
+ import * as React4 from "react";
2565
2581
  import { jsx as jsx41 } from "react/jsx-runtime";
2566
- var ToggleGroupContext = React3.createContext({
2582
+ var ToggleGroupContext = React4.createContext({
2567
2583
  size: "default",
2568
2584
  variant: "default"
2569
2585
  });
@@ -2596,7 +2612,7 @@ function ToggleGroupItem({
2596
2612
  size,
2597
2613
  ...props
2598
2614
  }) {
2599
- const context = React3.useContext(ToggleGroupContext);
2615
+ const context = React4.useContext(ToggleGroupContext);
2600
2616
  return /* @__PURE__ */ jsx41(
2601
2617
  TogglePrimitive2,
2602
2618
  {
@@ -11,7 +11,7 @@ import {
11
11
  DrawerContent,
12
12
  DrawerHeader,
13
13
  DrawerTitle
14
- } from "./chunk-F42SGQNW.js";
14
+ } from "./chunk-XUHJ5YSG.js";
15
15
  import {
16
16
  Button,
17
17
  cn
@@ -35,7 +35,7 @@ function DialogOverlay({
35
35
  {
36
36
  "data-slot": "dialog-overlay",
37
37
  className: cn(
38
- "fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0",
38
+ "fixed inset-0 z-50 bg-(--overlay-background) data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0 data-closed:fill-mode-forwards",
39
39
  className
40
40
  ),
41
41
  ...props
@@ -55,7 +55,7 @@ function DialogContent({
55
55
  {
56
56
  "data-slot": "dialog-content",
57
57
  className: cn(
58
- "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 sm:max-w-lg",
58
+ "fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border bg-popover p-6 shadow-lg shadow-(color:--shadow-color) duration-200 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 data-closed:fill-mode-forwards sm:max-w-lg",
59
59
  className
60
60
  ),
61
61
  ...props,