@pactor-app/ui 1.10.0 → 1.12.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.
@@ -82,8 +82,68 @@ function AccordionContent({
82
82
  );
83
83
  }
84
84
 
85
+ // src/ui/tooltip.tsx
86
+ import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
87
+ import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
88
+ function TooltipProvider({
89
+ delay = 0,
90
+ ...props
91
+ }) {
92
+ return /* @__PURE__ */ jsx2(
93
+ TooltipPrimitive.Provider,
94
+ {
95
+ "data-slot": "tooltip-provider",
96
+ delay,
97
+ ...props
98
+ }
99
+ );
100
+ }
101
+ function Tooltip({
102
+ ...props
103
+ }) {
104
+ return /* @__PURE__ */ jsx2(TooltipProvider, { children: /* @__PURE__ */ jsx2(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
105
+ }
106
+ function TooltipTrigger({
107
+ ...props
108
+ }) {
109
+ return /* @__PURE__ */ jsx2(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
110
+ }
111
+ function TooltipContent({
112
+ className,
113
+ side = "top",
114
+ sideOffset = 4,
115
+ align = "center",
116
+ children,
117
+ ...props
118
+ }) {
119
+ return /* @__PURE__ */ jsx2(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx2(
120
+ TooltipPrimitive.Positioner,
121
+ {
122
+ align,
123
+ side,
124
+ sideOffset,
125
+ className: "isolate z-50",
126
+ children: /* @__PURE__ */ jsxs2(
127
+ TooltipPrimitive.Popup,
128
+ {
129
+ "data-slot": "tooltip-content",
130
+ className: cn(
131
+ "z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground 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",
132
+ className
133
+ ),
134
+ ...props,
135
+ children: [
136
+ children,
137
+ /* @__PURE__ */ jsx2(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
138
+ ]
139
+ }
140
+ )
141
+ }
142
+ ) });
143
+ }
144
+
85
145
  // src/ui/card.tsx
86
- import { jsx as jsx2 } from "react/jsx-runtime";
146
+ import { jsx as jsx3 } from "react/jsx-runtime";
87
147
  var cardRoundedClasses = {
88
148
  none: "rounded-none",
89
149
  sm: "rounded-sm",
@@ -98,7 +158,7 @@ function Card({
98
158
  rounded = "lg",
99
159
  ...props
100
160
  }) {
101
- return /* @__PURE__ */ jsx2(
161
+ return /* @__PURE__ */ jsx3(
102
162
  "div",
103
163
  {
104
164
  "data-slot": "card",
@@ -112,7 +172,7 @@ function Card({
112
172
  );
113
173
  }
114
174
  function CardHeader({ className, ...props }) {
115
- return /* @__PURE__ */ jsx2(
175
+ return /* @__PURE__ */ jsx3(
116
176
  "div",
117
177
  {
118
178
  "data-slot": "card-header",
@@ -125,7 +185,7 @@ function CardHeader({ className, ...props }) {
125
185
  );
126
186
  }
127
187
  function CardTitle({ className, ...props }) {
128
- return /* @__PURE__ */ jsx2(
188
+ return /* @__PURE__ */ jsx3(
129
189
  "div",
130
190
  {
131
191
  "data-slot": "card-title",
@@ -135,7 +195,7 @@ function CardTitle({ className, ...props }) {
135
195
  );
136
196
  }
137
197
  function CardDescription({ className, ...props }) {
138
- return /* @__PURE__ */ jsx2(
198
+ return /* @__PURE__ */ jsx3(
139
199
  "div",
140
200
  {
141
201
  "data-slot": "card-description",
@@ -145,7 +205,7 @@ function CardDescription({ className, ...props }) {
145
205
  );
146
206
  }
147
207
  function CardAction({ className, ...props }) {
148
- return /* @__PURE__ */ jsx2(
208
+ return /* @__PURE__ */ jsx3(
149
209
  "div",
150
210
  {
151
211
  "data-slot": "card-action",
@@ -158,7 +218,7 @@ function CardAction({ className, ...props }) {
158
218
  );
159
219
  }
160
220
  function CardContent({ className, ...props }) {
161
- return /* @__PURE__ */ jsx2(
221
+ return /* @__PURE__ */ jsx3(
162
222
  "div",
163
223
  {
164
224
  "data-slot": "card-content",
@@ -168,7 +228,7 @@ function CardContent({ className, ...props }) {
168
228
  );
169
229
  }
170
230
  function CardFooter({ className, ...props }) {
171
- return /* @__PURE__ */ jsx2(
231
+ return /* @__PURE__ */ jsx3(
172
232
  "div",
173
233
  {
174
234
  "data-slot": "card-footer",
@@ -180,16 +240,16 @@ function CardFooter({ className, ...props }) {
180
240
 
181
241
  // src/ui/popover.tsx
182
242
  import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
183
- import { jsx as jsx3 } from "react/jsx-runtime";
243
+ import { jsx as jsx4 } from "react/jsx-runtime";
184
244
  function Popover({
185
245
  ...props
186
246
  }) {
187
- return /* @__PURE__ */ jsx3(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
247
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
188
248
  }
189
249
  function PopoverTrigger({
190
250
  ...props
191
251
  }) {
192
- return /* @__PURE__ */ jsx3(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
252
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Trigger, { "data-slot": "popover-trigger", ...props });
193
253
  }
194
254
  function PopoverContent({
195
255
  className,
@@ -199,7 +259,7 @@ function PopoverContent({
199
259
  anchor,
200
260
  ...props
201
261
  }) {
202
- return /* @__PURE__ */ jsx3(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx3(
262
+ return /* @__PURE__ */ jsx4(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx4(
203
263
  PopoverPrimitive.Positioner,
204
264
  {
205
265
  align,
@@ -207,7 +267,7 @@ function PopoverContent({
207
267
  sideOffset,
208
268
  anchor,
209
269
  className: "isolate z-50",
210
- children: /* @__PURE__ */ jsx3(
270
+ children: /* @__PURE__ */ jsx4(
211
271
  PopoverPrimitive.Popup,
212
272
  {
213
273
  "data-slot": "popover-content",
@@ -223,9 +283,9 @@ function PopoverContent({
223
283
  }
224
284
 
225
285
  // src/ui/input.tsx
226
- import { jsx as jsx4 } from "react/jsx-runtime";
286
+ import { jsx as jsx5 } from "react/jsx-runtime";
227
287
  function Input({ className, type, ...props }) {
228
- return /* @__PURE__ */ jsx4(
288
+ return /* @__PURE__ */ jsx5(
229
289
  "input",
230
290
  {
231
291
  type,
@@ -239,66 +299,6 @@ function Input({ className, type, ...props }) {
239
299
  );
240
300
  }
241
301
 
242
- // src/ui/tooltip.tsx
243
- import { Tooltip as TooltipPrimitive } from "@base-ui/react/tooltip";
244
- import { jsx as jsx5, jsxs as jsxs2 } from "react/jsx-runtime";
245
- function TooltipProvider({
246
- delay = 0,
247
- ...props
248
- }) {
249
- return /* @__PURE__ */ jsx5(
250
- TooltipPrimitive.Provider,
251
- {
252
- "data-slot": "tooltip-provider",
253
- delay,
254
- ...props
255
- }
256
- );
257
- }
258
- function Tooltip({
259
- ...props
260
- }) {
261
- return /* @__PURE__ */ jsx5(TooltipProvider, { children: /* @__PURE__ */ jsx5(TooltipPrimitive.Root, { "data-slot": "tooltip", ...props }) });
262
- }
263
- function TooltipTrigger({
264
- ...props
265
- }) {
266
- return /* @__PURE__ */ jsx5(TooltipPrimitive.Trigger, { "data-slot": "tooltip-trigger", ...props });
267
- }
268
- function TooltipContent({
269
- className,
270
- side = "top",
271
- sideOffset = 4,
272
- align = "center",
273
- children,
274
- ...props
275
- }) {
276
- return /* @__PURE__ */ jsx5(TooltipPrimitive.Portal, { children: /* @__PURE__ */ jsx5(
277
- TooltipPrimitive.Positioner,
278
- {
279
- align,
280
- side,
281
- sideOffset,
282
- className: "isolate z-50",
283
- children: /* @__PURE__ */ jsxs2(
284
- TooltipPrimitive.Popup,
285
- {
286
- "data-slot": "tooltip-content",
287
- className: cn(
288
- "z-50 w-fit origin-(--transform-origin) rounded-md bg-primary px-3 py-1.5 text-xs text-balance text-primary-foreground 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",
289
- className
290
- ),
291
- ...props,
292
- children: [
293
- children,
294
- /* @__PURE__ */ jsx5(TooltipPrimitive.Arrow, { className: "z-50 size-2.5 rotate-45 rounded-[2px] bg-primary fill-primary data-[side=top]:-bottom-1 data-[side=bottom]:-top-1 data-[side=left]:-right-1 data-[side=right]:-left-1" })
295
- ]
296
- }
297
- )
298
- }
299
- ) });
300
- }
301
-
302
302
  // src/ui/separator.tsx
303
303
  import { Separator as SeparatorPrimitive } from "@base-ui/react/separator";
304
304
  import { jsx as jsx6 } from "react/jsx-runtime";
@@ -1156,6 +1156,10 @@ export {
1156
1156
  AccordionItem,
1157
1157
  AccordionTrigger,
1158
1158
  AccordionContent,
1159
+ TooltipProvider,
1160
+ Tooltip,
1161
+ TooltipTrigger,
1162
+ TooltipContent,
1159
1163
  Card,
1160
1164
  CardHeader,
1161
1165
  CardTitle,
@@ -1167,10 +1171,6 @@ export {
1167
1171
  PopoverTrigger,
1168
1172
  PopoverContent,
1169
1173
  Input,
1170
- TooltipProvider,
1171
- Tooltip,
1172
- TooltipTrigger,
1173
- TooltipContent,
1174
1174
  useIsMobile,
1175
1175
  Separator,
1176
1176
  Sheet,
@@ -2,7 +2,7 @@ import {
2
2
  Icon,
3
3
  Menu,
4
4
  Sidebar
5
- } from "./chunk-PECP7DJB.js";
5
+ } from "./chunk-2B5YV2HR.js";
6
6
  import {
7
7
  Accordion,
8
8
  AccordionContent,
@@ -15,7 +15,7 @@ import {
15
15
  Popover,
16
16
  PopoverContent,
17
17
  PopoverTrigger
18
- } from "./chunk-VM4FESQB.js";
18
+ } from "./chunk-AUSWAD26.js";
19
19
  import {
20
20
  cn
21
21
  } from "./chunk-WKJUCGV4.js";
@@ -2,7 +2,7 @@ import {
2
2
  Popover,
3
3
  PopoverContent,
4
4
  PopoverTrigger
5
- } from "./chunk-VM4FESQB.js";
5
+ } from "./chunk-AUSWAD26.js";
6
6
  import {
7
7
  Button,
8
8
  buttonVariants,
@@ -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
  {