@facter/ds-core 1.33.9 → 1.33.10
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 +25 -35
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +24 -34
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -17,7 +17,7 @@ import { toast as toast$1, Toaster as Toaster$1 } from 'sonner';
|
|
|
17
17
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
18
18
|
import { FormProvider, useFormContext, Controller } from 'react-hook-form';
|
|
19
19
|
export { FormProvider, useFormContext } from 'react-hook-form';
|
|
20
|
-
import * as
|
|
20
|
+
import * as PopoverPrimitive2 from '@radix-ui/react-popover';
|
|
21
21
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
22
22
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
23
23
|
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
@@ -3379,22 +3379,6 @@ function FormInput({
|
|
|
3379
3379
|
) });
|
|
3380
3380
|
}
|
|
3381
3381
|
FormInput.displayName = "Form.Input";
|
|
3382
|
-
var Popover = PopoverPrimitive.Root;
|
|
3383
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
3384
|
-
var PopoverContent = React10.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
3385
|
-
PopoverPrimitive.Content,
|
|
3386
|
-
{
|
|
3387
|
-
ref,
|
|
3388
|
-
align,
|
|
3389
|
-
sideOffset,
|
|
3390
|
-
className: cn(
|
|
3391
|
-
"z-50 w-auto rounded-md border bg-popover p-4 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
3392
|
-
className
|
|
3393
|
-
),
|
|
3394
|
-
...props
|
|
3395
|
-
}
|
|
3396
|
-
) }));
|
|
3397
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
3398
3382
|
function FormSelect({
|
|
3399
3383
|
name,
|
|
3400
3384
|
label,
|
|
@@ -3522,19 +3506,6 @@ function CardSelect({
|
|
|
3522
3506
|
},
|
|
3523
3507
|
[onSearch]
|
|
3524
3508
|
);
|
|
3525
|
-
React10.useEffect(() => {
|
|
3526
|
-
const el = listRef.current;
|
|
3527
|
-
if (!el || !open) return;
|
|
3528
|
-
const handleWheel = (e) => {
|
|
3529
|
-
const { scrollTop, scrollHeight, clientHeight } = el;
|
|
3530
|
-
if (scrollHeight <= clientHeight) return;
|
|
3531
|
-
e.preventDefault();
|
|
3532
|
-
e.stopPropagation();
|
|
3533
|
-
el.scrollTop = Math.max(0, Math.min(scrollTop + e.deltaY, scrollHeight - clientHeight));
|
|
3534
|
-
};
|
|
3535
|
-
el.addEventListener("wheel", handleWheel, { passive: false, capture: true });
|
|
3536
|
-
return () => el.removeEventListener("wheel", handleWheel, { capture: true });
|
|
3537
|
-
}, [open, filteredOptions]);
|
|
3538
3509
|
const handleScroll = React10.useCallback(() => {
|
|
3539
3510
|
if (!onLoadMore || !hasMore || loading) return;
|
|
3540
3511
|
const el = listRef.current;
|
|
@@ -3544,9 +3515,9 @@ function CardSelect({
|
|
|
3544
3515
|
onLoadMore();
|
|
3545
3516
|
}
|
|
3546
3517
|
}, [onLoadMore, hasMore, loading]);
|
|
3547
|
-
return /* @__PURE__ */ jsxs(
|
|
3518
|
+
return /* @__PURE__ */ jsxs(PopoverPrimitive2.Root, { open, onOpenChange: handleOpenChange, children: [
|
|
3548
3519
|
/* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
3549
|
-
/* @__PURE__ */ jsx(
|
|
3520
|
+
/* @__PURE__ */ jsx(PopoverPrimitive2.Trigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
3550
3521
|
"button",
|
|
3551
3522
|
{
|
|
3552
3523
|
type: "button",
|
|
@@ -3583,11 +3554,14 @@ function CardSelect({
|
|
|
3583
3554
|
)
|
|
3584
3555
|
] }),
|
|
3585
3556
|
/* @__PURE__ */ jsxs(
|
|
3586
|
-
|
|
3557
|
+
PopoverPrimitive2.Content,
|
|
3587
3558
|
{
|
|
3588
3559
|
align: "start",
|
|
3589
3560
|
sideOffset: 4,
|
|
3590
|
-
className:
|
|
3561
|
+
className: cn(
|
|
3562
|
+
"z-50 rounded-md border bg-popover text-popover-foreground shadow-lg p-0 overflow-hidden",
|
|
3563
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=top]:slide-in-from-bottom-2"
|
|
3564
|
+
),
|
|
3591
3565
|
style: { width: "var(--radix-popover-trigger-width)" },
|
|
3592
3566
|
onOpenAutoFocus: (e) => {
|
|
3593
3567
|
e.preventDefault();
|
|
@@ -4218,6 +4192,22 @@ var DropdownMenuShortcut = ({
|
|
|
4218
4192
|
);
|
|
4219
4193
|
};
|
|
4220
4194
|
DropdownMenuShortcut.displayName = "DropdownMenuShortcut";
|
|
4195
|
+
var Popover = PopoverPrimitive2.Root;
|
|
4196
|
+
var PopoverTrigger = PopoverPrimitive2.Trigger;
|
|
4197
|
+
var PopoverContent = React10.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(PopoverPrimitive2.Portal, { children: /* @__PURE__ */ jsx(
|
|
4198
|
+
PopoverPrimitive2.Content,
|
|
4199
|
+
{
|
|
4200
|
+
ref,
|
|
4201
|
+
align,
|
|
4202
|
+
sideOffset,
|
|
4203
|
+
className: cn(
|
|
4204
|
+
"z-50 w-auto rounded-md border bg-popover p-4 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
4205
|
+
className
|
|
4206
|
+
),
|
|
4207
|
+
...props
|
|
4208
|
+
}
|
|
4209
|
+
) }));
|
|
4210
|
+
PopoverContent.displayName = PopoverPrimitive2.Content.displayName;
|
|
4221
4211
|
var TooltipProvider = TooltipPrimitive.Provider;
|
|
4222
4212
|
var TooltipRoot = TooltipPrimitive.Root;
|
|
4223
4213
|
var TooltipTrigger = TooltipPrimitive.Trigger;
|