@px-ui/ui 1.0.7 → 1.0.8
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/{avatar-DdYYpDmu.d.ts → avatar-B225ydaK.d.ts} +6 -6
- package/dist/{avatar-DdYYpDmu.d.ts.map → avatar-B225ydaK.d.ts.map} +1 -1
- package/dist/{button-C-OzpEyi.d.ts → button-D3as908Z.d.ts} +6 -6
- package/dist/{button-C-OzpEyi.d.ts.map → button-D3as908Z.d.ts.map} +1 -1
- package/dist/{combobox-DTygpIvb.js → combobox-CHkmVNZ2.js} +2 -2
- package/dist/{combobox-DTygpIvb.js.map → combobox-CHkmVNZ2.js.map} +1 -1
- package/dist/{combobox-1lTwjKTL.d.ts → combobox-DXVq26eH.d.ts} +19 -19
- package/dist/{combobox-1lTwjKTL.d.ts.map → combobox-DXVq26eH.d.ts.map} +1 -1
- package/dist/components/accordion.d.ts +5 -5
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert.d.ts +5 -5
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/avatar-group.d.ts +4 -4
- package/dist/components/avatar-group.d.ts.map +1 -1
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/badge.d.ts +3 -3
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/breadcrumb.d.ts +7 -7
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/button-group.d.ts +6 -6
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button.d.ts +1 -1
- package/dist/components/calendar.d.ts +4 -4
- package/dist/components/card.d.ts +8 -8
- package/dist/components/carousel.d.ts +7 -7
- package/dist/components/carousel.d.ts.map +1 -1
- package/dist/components/chart.d.ts +5 -5
- package/dist/components/checkbox.d.ts +2 -2
- package/dist/components/collapsible.d.ts +4 -4
- package/dist/components/combobox.d.ts +2 -2
- package/dist/components/combobox.js +2 -2
- package/dist/components/command.d.ts +11 -11
- package/dist/components/context-menu.d.ts +16 -16
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/currency-select-field.d.ts +4 -4
- package/dist/components/currency-select-field.d.ts.map +1 -1
- package/dist/components/currency-select-field.js +2 -2
- package/dist/components/dialog.d.ts +11 -11
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/drawer.d.ts +11 -11
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/empty.d.ts +9 -9
- package/dist/components/empty.d.ts.map +1 -1
- package/dist/components/field.d.ts +15 -15
- package/dist/components/file-upload-field.d.ts +2 -2
- package/dist/components/file-upload.d.ts +2 -2
- package/dist/components/hover-card.d.ts +4 -4
- package/dist/components/hover-card.d.ts.map +1 -1
- package/dist/components/input-group.d.ts +11 -11
- package/dist/components/input-group.d.ts.map +1 -1
- package/dist/components/input-otp.d.ts +5 -5
- package/dist/components/input-otp.d.ts.map +1 -1
- package/dist/components/input.d.ts +1 -1
- package/dist/components/item.d.ts +14 -14
- package/dist/components/item.d.ts.map +1 -1
- package/dist/components/kbd.d.ts +3 -3
- package/dist/components/label.d.ts +1 -1
- package/dist/components/menubar.d.ts +18 -18
- package/dist/components/native-select.d.ts +4 -4
- package/dist/components/navigation-menu.d.ts +11 -11
- package/dist/components/pagination.d.ts +9 -9
- package/dist/components/phone-input.d.ts +2 -2
- package/dist/components/popover.d.ts +7 -7
- package/dist/components/progress.d.ts +6 -6
- package/dist/components/radio-group.d.ts +3 -3
- package/dist/components/resizable.d.ts +4 -4
- package/dist/components/scroll-area.d.ts +3 -3
- package/dist/components/select.d.ts +10 -10
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/sheet.d.ts +9 -9
- package/dist/components/sidebar.d.ts +26 -26
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/skeleton.d.ts +2 -2
- package/dist/components/slider.d.ts +2 -2
- package/dist/components/spinner.d.ts +2 -2
- package/dist/components/switch.d.ts +2 -2
- package/dist/components/table.d.ts +9 -9
- package/dist/components/tabs.d.ts +7 -7
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/textarea.d.ts +2 -2
- package/dist/components/toast.d.ts +1 -1
- package/dist/components/toggle-group.d.ts +4 -4
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/toggle.d.ts +1 -1
- package/dist/components/toggle.js +1 -1
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/{dropdown-menu-Ce2Z1lR9.d.ts → dropdown-menu-D4Lq8KcT.d.ts} +17 -17
- package/dist/{dropdown-menu-Ce2Z1lR9.d.ts.map → dropdown-menu-D4Lq8KcT.d.ts.map} +1 -1
- package/dist/{file-upload-OJKr6lbZ.d.ts → file-upload-Cbz2hJLS.d.ts} +11 -11
- package/dist/{file-upload-OJKr6lbZ.d.ts.map → file-upload-Cbz2hJLS.d.ts.map} +1 -1
- package/dist/hooks/use-async-options.d.ts +1 -1
- package/dist/hooks/use-async-options.js +1 -1
- package/dist/input-BtIHVMec.d.ts +12 -0
- package/dist/input-BtIHVMec.d.ts.map +1 -0
- package/dist/label-DSbNg_nY.d.ts +11 -0
- package/dist/label-DSbNg_nY.d.ts.map +1 -0
- package/dist/providers/px-ui-provider.d.ts +4 -4
- package/dist/{separator-BNtM8qCY.d.ts → separator-xmk2NR_s.d.ts} +3 -3
- package/dist/separator-xmk2NR_s.d.ts.map +1 -0
- package/dist/styles.css +1 -1
- package/dist/{toast-BigFfoHp.d.ts → toast-C_zQMC72.d.ts} +4 -4
- package/dist/{toast-BigFfoHp.d.ts.map → toast-C_zQMC72.d.ts.map} +1 -1
- package/dist/{toggle-BuZQg-8n.d.ts → toggle-CASEgcGG.d.ts} +6 -6
- package/dist/{toggle-BuZQg-8n.d.ts.map → toggle-CASEgcGG.d.ts.map} +1 -1
- package/dist/{toggle-DhJ_qwgw.js → toggle-lqIyJptS.js} +5 -4
- package/dist/toggle-lqIyJptS.js.map +1 -0
- package/dist/{tooltip-CcBhdv6s.d.ts → tooltip-ChzCP6Bv.d.ts} +6 -6
- package/dist/{tooltip-CcBhdv6s.d.ts.map → tooltip-ChzCP6Bv.d.ts.map} +1 -1
- package/dist/{use-async-options-CzfoNtbl.d.ts → use-async-options-CD5BgoHR.d.ts} +14 -2
- package/dist/use-async-options-CD5BgoHR.d.ts.map +1 -0
- package/dist/{use-async-options-BtuWFvWZ.js → use-async-options-CcsImGX4.js} +6 -3
- package/dist/use-async-options-CcsImGX4.js.map +1 -0
- package/package.json +1 -1
- package/dist/input-ibkmH2IB.d.ts +0 -12
- package/dist/input-ibkmH2IB.d.ts.map +0 -1
- package/dist/label-ScNzLnIz.d.ts +0 -11
- package/dist/label-ScNzLnIz.d.ts.map +0 -1
- package/dist/separator-BNtM8qCY.d.ts.map +0 -1
- package/dist/toggle-DhJ_qwgw.js.map +0 -1
- package/dist/use-async-options-BtuWFvWZ.js.map +0 -1
- package/dist/use-async-options-CzfoNtbl.d.ts.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as toggleVariants, t as Toggle } from "../toggle-
|
|
1
|
+
import { n as toggleVariants, t as Toggle } from "../toggle-CASEgcGG.js";
|
|
2
2
|
export { Toggle, toggleVariants };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "../tooltip-
|
|
1
|
+
import { i as TooltipTrigger, n as TooltipContent, r as TooltipProvider, t as Tooltip } from "../tooltip-ChzCP6Bv.js";
|
|
2
2
|
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime191 from "react/jsx-runtime";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import { Menu } from "@base-ui/react/menu";
|
|
4
4
|
|
|
5
5
|
//#region src/components/dropdown-menu.d.ts
|
|
6
6
|
declare function DropdownMenu({
|
|
7
7
|
...props
|
|
8
|
-
}: Menu.Root.Props):
|
|
8
|
+
}: Menu.Root.Props): react_jsx_runtime191.JSX.Element;
|
|
9
9
|
declare function DropdownMenuPortal({
|
|
10
10
|
...props
|
|
11
|
-
}: Menu.Portal.Props):
|
|
11
|
+
}: Menu.Portal.Props): react_jsx_runtime191.JSX.Element;
|
|
12
12
|
declare function DropdownMenuTrigger({
|
|
13
13
|
...props
|
|
14
|
-
}: Menu.Trigger.Props):
|
|
14
|
+
}: Menu.Trigger.Props): react_jsx_runtime191.JSX.Element;
|
|
15
15
|
declare function DropdownMenuContent({
|
|
16
16
|
align,
|
|
17
17
|
alignOffset,
|
|
@@ -19,17 +19,17 @@ declare function DropdownMenuContent({
|
|
|
19
19
|
sideOffset,
|
|
20
20
|
className,
|
|
21
21
|
...props
|
|
22
|
-
}: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">):
|
|
22
|
+
}: Menu.Popup.Props & Pick<Menu.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): react_jsx_runtime191.JSX.Element;
|
|
23
23
|
declare function DropdownMenuGroup({
|
|
24
24
|
...props
|
|
25
|
-
}: Menu.Group.Props):
|
|
25
|
+
}: Menu.Group.Props): react_jsx_runtime191.JSX.Element;
|
|
26
26
|
declare function DropdownMenuLabel({
|
|
27
27
|
className,
|
|
28
28
|
inset,
|
|
29
29
|
...props
|
|
30
30
|
}: Menu.GroupLabel.Props & {
|
|
31
31
|
inset?: boolean;
|
|
32
|
-
}):
|
|
32
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
33
33
|
declare function DropdownMenuItem({
|
|
34
34
|
className,
|
|
35
35
|
inset,
|
|
@@ -38,10 +38,10 @@ declare function DropdownMenuItem({
|
|
|
38
38
|
}: Menu.Item.Props & {
|
|
39
39
|
inset?: boolean;
|
|
40
40
|
variant?: "default" | "destructive";
|
|
41
|
-
}):
|
|
41
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
42
42
|
declare function DropdownMenuSub({
|
|
43
43
|
...props
|
|
44
|
-
}: Menu.SubmenuRoot.Props):
|
|
44
|
+
}: Menu.SubmenuRoot.Props): react_jsx_runtime191.JSX.Element;
|
|
45
45
|
declare function DropdownMenuSubTrigger({
|
|
46
46
|
className,
|
|
47
47
|
inset,
|
|
@@ -49,7 +49,7 @@ declare function DropdownMenuSubTrigger({
|
|
|
49
49
|
...props
|
|
50
50
|
}: Menu.SubmenuTrigger.Props & {
|
|
51
51
|
inset?: boolean;
|
|
52
|
-
}):
|
|
52
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
53
53
|
declare function DropdownMenuSubContent({
|
|
54
54
|
align,
|
|
55
55
|
alignOffset,
|
|
@@ -57,7 +57,7 @@ declare function DropdownMenuSubContent({
|
|
|
57
57
|
sideOffset,
|
|
58
58
|
className,
|
|
59
59
|
...props
|
|
60
|
-
}: React$1.ComponentProps<typeof DropdownMenuContent>):
|
|
60
|
+
}: React$1.ComponentProps<typeof DropdownMenuContent>): react_jsx_runtime191.JSX.Element;
|
|
61
61
|
declare function DropdownMenuCheckboxItem({
|
|
62
62
|
className,
|
|
63
63
|
children,
|
|
@@ -66,10 +66,10 @@ declare function DropdownMenuCheckboxItem({
|
|
|
66
66
|
...props
|
|
67
67
|
}: Menu.CheckboxItem.Props & {
|
|
68
68
|
inset?: boolean;
|
|
69
|
-
}):
|
|
69
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
70
70
|
declare function DropdownMenuRadioGroup({
|
|
71
71
|
...props
|
|
72
|
-
}: Menu.RadioGroup.Props):
|
|
72
|
+
}: Menu.RadioGroup.Props): react_jsx_runtime191.JSX.Element;
|
|
73
73
|
declare function DropdownMenuRadioItem({
|
|
74
74
|
className,
|
|
75
75
|
children,
|
|
@@ -77,15 +77,15 @@ declare function DropdownMenuRadioItem({
|
|
|
77
77
|
...props
|
|
78
78
|
}: Menu.RadioItem.Props & {
|
|
79
79
|
inset?: boolean;
|
|
80
|
-
}):
|
|
80
|
+
}): react_jsx_runtime191.JSX.Element;
|
|
81
81
|
declare function DropdownMenuSeparator({
|
|
82
82
|
className,
|
|
83
83
|
...props
|
|
84
|
-
}: Menu.Separator.Props):
|
|
84
|
+
}: Menu.Separator.Props): react_jsx_runtime191.JSX.Element;
|
|
85
85
|
declare function DropdownMenuShortcut({
|
|
86
86
|
className,
|
|
87
87
|
...props
|
|
88
|
-
}: React$1.ComponentProps<"span">):
|
|
88
|
+
}: React$1.ComponentProps<"span">): react_jsx_runtime191.JSX.Element;
|
|
89
89
|
//#endregion
|
|
90
90
|
export { DropdownMenuItem as a, DropdownMenuRadioGroup as c, DropdownMenuShortcut as d, DropdownMenuSub as f, DropdownMenuTrigger as h, DropdownMenuGroup as i, DropdownMenuRadioItem as l, DropdownMenuSubTrigger as m, DropdownMenuCheckboxItem as n, DropdownMenuLabel as o, DropdownMenuSubContent as p, DropdownMenuContent as r, DropdownMenuPortal as s, DropdownMenu as t, DropdownMenuSeparator as u };
|
|
91
|
-
//# sourceMappingURL=dropdown-menu-
|
|
91
|
+
//# sourceMappingURL=dropdown-menu-D4Lq8KcT.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dropdown-menu-
|
|
1
|
+
{"version":3,"file":"dropdown-menu-D4Lq8KcT.d.ts","names":[],"sources":["../src/components/dropdown-menu.tsx"],"sourcesContent":[],"mappings":";;;;;iBAMS,YAAA;;GAA2B,IAAA,CAAc,IAAA,CAAK,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAInD,kBAAA;;GAAiC,IAAA,CAAc,MAAA,CAAO,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAI3D,mBAAA;;GAAkC,IAAA,CAAc,OAAA,CAAQ,QAAK,oBAAA,CAAA,GAAA,CAAA;AAbX,iBAiBlD,mBAAA,CAZyC;EAAA,KAAK;EAAA,WAAK;EAAA,IAAA;EAAA,UAAA;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAmBzD,IAAA,CAAc,KAAA,CAAM,KAnB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AsG4B,mBAtG5B,CAAA,CAAA,EAsGgD,oBAAA,CAAA,GAAA,CAAA,OAtGhD;AAAA,iBAoHM,wBAAA,CAhG8C;EAAA,SAAM;EAAK,QAAA;EAAA,OAAA;EAAA,KAAA;EAAA,GAAA;CAAA,EAsG/D,IAAA,CAAc,YAAA,CAAa,KAtGoC,GAAA;EAIzD,KAAA,CAAA,EAAA,OAAA;CACP,CAAA,EAmGD,oBAAA,CAAA,GAAA,CAAA,OAnGC;iBA6HO,sBAAA,CA5HP;EAAA,GAAA;AAAA,CAAA,EA4H4C,IAAA,CAAc,UAAA,CAAW,KA5HrE,CAAA,EA4H0E,oBAAA,CAAA,GAAA,CAAA,OA5H1E;iBAqIO,qBAAA,CAnImB;EAAA,SAAA;EAAA,QAAA;EAAA,KAAA;EAAA,GAAA;CAAA,EAwIzB,IAAA,CAAc,SAAA,CAAU,KAxIC,GAAA;EAE3B,KAAA,CAAA,EAAA,OAAA;CAAA,CAAA,EAwIA,oBAAA,CAAA,GAAA,CAAA,OAxIA;AAAA,iBAiKQ,qBAAA,CAnJgB;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAsJtB,IAAA,CAAc,SAAA,CAAU,KAtJF,CAAA,EAsJO,oBAAA,CAAA,GAAA,CAAA,OAtJP;iBAgKhB,oBAAA,CA/JP;EAAA,SAAA;EAAA,GAAA;AAAA,CAAA,EAkKC,OAAA,CAAM,cAlKP,CAAA,MAAA,CAAA,CAAA,EAkK6B,oBAAA,CAAA,GAAA,CAAA,OAlK7B"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as Button } from "./button-
|
|
1
|
+
import { t as Button } from "./button-D3as908Z.js";
|
|
2
2
|
import { d as UseFileUploadReturn, n as FileUploadItem } from "./use-file-upload-yy-xLBtn.js";
|
|
3
3
|
import { LucideIcon } from "lucide-react";
|
|
4
|
-
import * as
|
|
4
|
+
import * as react_jsx_runtime73 from "react/jsx-runtime";
|
|
5
5
|
import * as React$1 from "react";
|
|
6
6
|
import { VariantProps } from "class-variance-authority";
|
|
7
|
-
import * as
|
|
7
|
+
import * as class_variance_authority_types0 from "class-variance-authority/types";
|
|
8
8
|
|
|
9
9
|
//#region src/components/file-upload.d.ts
|
|
10
10
|
type FileInfo = {
|
|
@@ -35,11 +35,11 @@ declare function Root({
|
|
|
35
35
|
multiple,
|
|
36
36
|
disabled,
|
|
37
37
|
className
|
|
38
|
-
}: RootProps):
|
|
38
|
+
}: RootProps): react_jsx_runtime73.JSX.Element;
|
|
39
39
|
declare const dropzoneVariants: (props?: ({
|
|
40
40
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
41
41
|
isDragActive?: boolean | null | undefined;
|
|
42
|
-
} &
|
|
42
|
+
} & class_variance_authority_types0.ClassProp) | undefined) => string;
|
|
43
43
|
/** State passed to the render prop */
|
|
44
44
|
interface DropzoneState {
|
|
45
45
|
/** Whether files are being dragged over the dropzone */
|
|
@@ -84,12 +84,12 @@ declare function Dropzone({
|
|
|
84
84
|
browseText,
|
|
85
85
|
render,
|
|
86
86
|
...props
|
|
87
|
-
}: DropzoneProps):
|
|
87
|
+
}: DropzoneProps): react_jsx_runtime73.JSX.Element;
|
|
88
88
|
interface HiddenInputProps extends Omit<React$1.ComponentProps<"input">, "type"> {}
|
|
89
89
|
declare function HiddenInput({
|
|
90
90
|
className,
|
|
91
91
|
...props
|
|
92
|
-
}: HiddenInputProps):
|
|
92
|
+
}: HiddenInputProps): react_jsx_runtime73.JSX.Element;
|
|
93
93
|
interface ListProps extends Omit<React$1.ComponentProps<"div">, "children"> {
|
|
94
94
|
children?: React$1.ReactNode | ((files: FileUploadItem[]) => React$1.ReactNode);
|
|
95
95
|
}
|
|
@@ -97,7 +97,7 @@ declare function List({
|
|
|
97
97
|
className,
|
|
98
98
|
children,
|
|
99
99
|
...props
|
|
100
|
-
}: ListProps):
|
|
100
|
+
}: ListProps): react_jsx_runtime73.JSX.Element | null;
|
|
101
101
|
interface ListItemProps extends React$1.ComponentProps<"div"> {
|
|
102
102
|
file: FileUploadItem;
|
|
103
103
|
/** Show file type icon (default: true) */
|
|
@@ -126,12 +126,12 @@ declare function ListItem({
|
|
|
126
126
|
icon,
|
|
127
127
|
onItemClick,
|
|
128
128
|
...props
|
|
129
|
-
}: ListItemProps):
|
|
129
|
+
}: ListItemProps): react_jsx_runtime73.JSX.Element;
|
|
130
130
|
interface ClearAllProps extends React$1.ComponentProps<typeof Button> {}
|
|
131
131
|
declare function ClearAll({
|
|
132
132
|
children,
|
|
133
133
|
...props
|
|
134
|
-
}: ClearAllProps):
|
|
134
|
+
}: ClearAllProps): react_jsx_runtime73.JSX.Element | null;
|
|
135
135
|
declare const FileUpload: {
|
|
136
136
|
Root: typeof Root;
|
|
137
137
|
Dropzone: typeof Dropzone;
|
|
@@ -142,4 +142,4 @@ declare const FileUpload: {
|
|
|
142
142
|
};
|
|
143
143
|
//#endregion
|
|
144
144
|
export { FileUpload as a, ListProps as c, DropzoneState as i, RootProps as l, DropzoneProps as n, HiddenInputProps as o, DropzoneRenderProps as r, ListItemProps as s, ClearAllProps as t, getFileTypeIcon as u };
|
|
145
|
-
//# sourceMappingURL=file-upload-
|
|
145
|
+
//# sourceMappingURL=file-upload-Cbz2hJLS.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-upload-
|
|
1
|
+
{"version":3,"file":"file-upload-Cbz2hJLS.d.ts","names":[],"sources":["../src/components/file-upload.tsx"],"sourcesContent":[],"mappings":";;;;;;;;;KA4BK,QAAA;;;;AANoC;AAM5B;AAkLb;AAWC;iBA3DQ,eAAA,CA8DP,IAAA,EA9D6B,QA8D7B,CAAA,EA9DwC,UA8DxC;AACA,UAfe,SAAA,CAef;EACA,QAAA,EAfU,OAAA,CAAM,SAehB;EACA;EACA,MAAA,EAfQ,mBAeR;EACA;EACC,MAAA,CAAA,EAAA,MAAA;EAAS;EAAA,QAAA,CAAA,EAAA,OAAA;EAwBN;EAsBW,QAAA,CAAA,EAAA,OAAa;E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AhBP,OAAA,CAAM,SAgBC;EA4IC;EAER,WAAQ,CAAA,EAAA,CAAA,IAAA,EA5JM,cA4JN,EAAA,GAAA,IAAA;;iBAzJR,QAAA,CAyJiC;EAAA,IAAA;EAAA,SAAA;EAAA,QAAA;EAAA,YAAA;EAAA,SAAA;EAAA,UAAA;EAAA,SAAA;EAAA,IAAA;EAAA,WAAA;EAAA,GAAA;AAAA,CAAA,EA9IvC,aA8IuC,CAAA,EA9I1B,mBAAA,CAAA,GAAA,CAAA,OA8I0B;AAAa,UAFtC,aAAA,SAAsB,OAAA,CAAM,cAEU,CAAA,OAFY,MAEZ,CAAA,CAAA;AA0BvD,iBA1BS,QAAA,CAiCR;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EAjCyC,aAiCzC,CAAA,EAjCsD,mBAAA,CAAA,GAAA,CAAA,OAAA,GAiCtD,IAAA;cAPY"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as useAsyncOptions, i as defineLoadOptions, n as InferOptions, r as LoadOptionsConfig, t as InferOption } from "../use-async-options-
|
|
1
|
+
import { a as useAsyncOptions, i as defineLoadOptions, n as InferOptions, r as LoadOptionsConfig, t as InferOption } from "../use-async-options-CD5BgoHR.js";
|
|
2
2
|
export { InferOption, InferOptions, LoadOptionsConfig, defineLoadOptions, useAsyncOptions };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import * as react_jsx_runtime89 from "react/jsx-runtime";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/input.d.ts
|
|
5
|
+
declare function Input({
|
|
6
|
+
className,
|
|
7
|
+
type,
|
|
8
|
+
...props
|
|
9
|
+
}: React$1.ComponentProps<"input">): react_jsx_runtime89.JSX.Element;
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Input as t };
|
|
12
|
+
//# sourceMappingURL=input-BtIHVMec.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"input-BtIHVMec.d.ts","names":[],"sources":["../src/components/input.tsx"],"sourcesContent":[],"mappings":";;;;iBAKS,KAAA;;;;GAAqC,OAAA,CAAM,0BAAuB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as react_jsx_runtime99 from "react/jsx-runtime";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
|
|
4
|
+
//#region src/components/label.d.ts
|
|
5
|
+
declare function Label({
|
|
6
|
+
className,
|
|
7
|
+
...props
|
|
8
|
+
}: React$1.ComponentProps<"label">): react_jsx_runtime99.JSX.Element;
|
|
9
|
+
//#endregion
|
|
10
|
+
export { Label as t };
|
|
11
|
+
//# sourceMappingURL=label-DSbNg_nY.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"label-DSbNg_nY.d.ts","names":[],"sources":["../src/components/label.tsx"],"sourcesContent":[],"mappings":";;;;iBAMS,KAAA;;;GAA+B,OAAA,CAAM,0BAAuB,mBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { r as TooltipProvider } from "../tooltip-
|
|
2
|
-
import { n as AnchoredToaster, o as ToasterProps } from "../toast-
|
|
3
|
-
import * as
|
|
1
|
+
import { r as TooltipProvider } from "../tooltip-ChzCP6Bv.js";
|
|
2
|
+
import { n as AnchoredToaster, o as ToasterProps } from "../toast-C_zQMC72.js";
|
|
3
|
+
import * as react_jsx_runtime254 from "react/jsx-runtime";
|
|
4
4
|
import * as React$1 from "react";
|
|
5
5
|
|
|
6
6
|
//#region src/providers/px-ui-provider.d.ts
|
|
@@ -30,7 +30,7 @@ declare function PXUIProvider({
|
|
|
30
30
|
tooltip,
|
|
31
31
|
toaster,
|
|
32
32
|
anchoredToaster
|
|
33
|
-
}: PXUIProviderProps):
|
|
33
|
+
}: PXUIProviderProps): react_jsx_runtime254.JSX.Element;
|
|
34
34
|
//#endregion
|
|
35
35
|
export { PXUIProvider, type PXUIProviderProps };
|
|
36
36
|
//# sourceMappingURL=px-ui-provider.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime69 from "react/jsx-runtime";
|
|
2
2
|
import { Separator } from "@base-ui/react/separator";
|
|
3
3
|
|
|
4
4
|
//#region src/components/separator.d.ts
|
|
@@ -6,7 +6,7 @@ declare function Separator$1({
|
|
|
6
6
|
className,
|
|
7
7
|
orientation,
|
|
8
8
|
...props
|
|
9
|
-
}: Separator.Props):
|
|
9
|
+
}: Separator.Props): react_jsx_runtime69.JSX.Element;
|
|
10
10
|
//#endregion
|
|
11
11
|
export { Separator$1 as t };
|
|
12
|
-
//# sourceMappingURL=separator-
|
|
12
|
+
//# sourceMappingURL=separator-xmk2NR_s.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"separator-xmk2NR_s.d.ts","names":[],"sources":["../src/components/separator.tsx"],"sourcesContent":[],"mappings":";;;;iBAIS,WAAA;;;;GAIN,SAAA,CAAmB,QAAK,mBAAA,CAAA,GAAA,CAAA"}
|
package/dist/styles.css
CHANGED
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
--primary-foreground: oklch(1 0 0);
|
|
90
90
|
--secondary: oklch(0.967 0.001 286.375);
|
|
91
91
|
--secondary-foreground: oklch(0.21 0.006 285.885);
|
|
92
|
-
--muted: oklch(0.
|
|
92
|
+
--muted: oklch(0.967 0.001 286.375);
|
|
93
93
|
--muted-foreground: oklch(0.552 0.016 285.938);
|
|
94
94
|
--accent: oklch(0.96 0.035 156);
|
|
95
95
|
--accent-foreground: oklch(0.141 0.005 285.823);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime214 from "react/jsx-runtime";
|
|
2
2
|
import * as React$1 from "react";
|
|
3
3
|
import * as _base_ui_react0 from "@base-ui/react";
|
|
4
4
|
import { Toast, ToastManagerAddOptions, ToastManagerPromiseOptions, ToastManagerUpdateOptions } from "@base-ui/react/toast";
|
|
@@ -20,7 +20,7 @@ type ToasterProps = Omit<Toast.Provider.Props, "toastManager" | "children"> & {
|
|
|
20
20
|
declare function Toaster({
|
|
21
21
|
position,
|
|
22
22
|
...props
|
|
23
|
-
}: ToasterProps):
|
|
23
|
+
}: ToasterProps): react_jsx_runtime214.JSX.Element;
|
|
24
24
|
type ToastOptions = Omit<ToastManagerAddOptions<any>, "title" | "type">;
|
|
25
25
|
/**
|
|
26
26
|
* Dispatch a toast from anywhere. Backed by a global Base UI toast manager, so
|
|
@@ -68,7 +68,7 @@ declare const anchoredToast: ((title: React$1.ReactNode, options: AnchoredToastO
|
|
|
68
68
|
* Host for anchored toasts. Mount it once near the app root; dispatch with the
|
|
69
69
|
* exported `anchoredToast` helper.
|
|
70
70
|
*/
|
|
71
|
-
declare function AnchoredToaster(props: Omit<Toast.Provider.Props, "toastManager" | "children">):
|
|
71
|
+
declare function AnchoredToaster(props: Omit<Toast.Provider.Props, "toastManager" | "children">): react_jsx_runtime214.JSX.Element;
|
|
72
72
|
//#endregion
|
|
73
73
|
export { ToasterPosition as a, anchoredToastManager as c, Toaster as i, toast as l, AnchoredToaster as n, ToasterProps as o, ToastOptions as r, anchoredToast as s, AnchoredToastOptions as t, toastManager as u };
|
|
74
|
-
//# sourceMappingURL=toast-
|
|
74
|
+
//# sourceMappingURL=toast-C_zQMC72.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toast-
|
|
1
|
+
{"version":3,"file":"toast-C_zQMC72.d.ts","names":[],"sources":["../src/components/toast.tsx"],"sourcesContent":[],"mappings":";;;;;;cAsBM,cAAyC,eAAA,CAA7B;KAEb,eAAA;KAkBA,YAAA,GAAe,KAAK,KAAA,CAAM,QAAA,CAAS;EApBlC;AAAY;AAEE;;EAkBA,QAAA,CAAA,EAKP,eALO;CAKP;;AAAe;;;iBAOnB,OAAA,CAA6D;EAAA,QAAA;EAAA,GAAA;AAAA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APX,CAAA,GAAA,CAAA,EAAA,GAAA,IAAA;EAAR,OAAA,EAAA,CAAA,EAAA,CAAA,EAAA,MAAA,EAAA,GAAA,IAAA;CAAgC;cAevC,oBAf+B,EAekB,eAAA,CAA7B,YAfW,CAAA,GAAA,CAAA;KAiBhC,oBAAA,GAAuB,YAhBY,GAAA;EAA3B;EAAsC,MAAA,EAkBzC,OAlByC,GAAA,IAAA;CAAA;;;AAMM;AAQ/B;AAIT;;;;;;;cA4BX,aAxBiB,EAAA,CAAA,CAAA,KAAA,EAAN,OAAA,CAAM,SAAA,EAAA,OAAA,EAAoB,oBAApB,EAAA,GAAA,MAAA,CAAA,GAAA;EAAoB,OAAA,EAAA,CAAA,KAAA,EAA1B,OAAA,CAAM,SAAoB,EAAA,OAAA,EAAA,oBAAA,EAAA,GAAA,MAAA;EAA1B,IAAA,EAAM,CAAA,KAAA,EAAN,OAAA,CAAM,SAAA,EAAA,OAAA,EAAoB,oBAApB,EAAA,GAAA,MAAA;EAAoB,OAAA,EAAA,CAAA,KAAA,EAA1B,OAAA,CAAM,SAAoB,EAAA,OAAA,EAAA,oBAAA,EAAA,GAAA,MAAA;EAAoB,KAAA,EAAA,CAAA,KAAA,EAA9C,OAAA,CAAM,SAAwC,EAAA,OAAA,EAApB,oBAAoB,EAAA,GAAA,MAAA;EAoCtD,OAAA,EAAA,CAAA,EAAe,CAAf,EAAA,MAAe,EAAA,GAAA,IAAA;CACV;;;;;iBADL,eAAA,QACA,KAAK,KAAA,CAAM,QAAA,CAAS,sCAAmC,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime299 from "react/jsx-runtime";
|
|
2
2
|
import { VariantProps } from "class-variance-authority";
|
|
3
3
|
import { Toggle } from "@base-ui/react/toggle";
|
|
4
|
-
import * as
|
|
4
|
+
import * as class_variance_authority_types13 from "class-variance-authority/types";
|
|
5
5
|
|
|
6
6
|
//#region src/components/toggle.d.ts
|
|
7
7
|
declare const toggleVariants: (props?: ({
|
|
8
|
-
variant?: "default" | "outline" | null | undefined;
|
|
8
|
+
variant?: "default" | "outline" | "accent" | null | undefined;
|
|
9
9
|
size?: "default" | "sm" | "lg" | null | undefined;
|
|
10
|
-
} &
|
|
10
|
+
} & class_variance_authority_types13.ClassProp) | undefined) => string;
|
|
11
11
|
declare function Toggle$1({
|
|
12
12
|
className,
|
|
13
13
|
variant,
|
|
14
14
|
size,
|
|
15
15
|
...props
|
|
16
|
-
}: Toggle.Props & VariantProps<typeof toggleVariants>):
|
|
16
|
+
}: Toggle.Props & VariantProps<typeof toggleVariants>): react_jsx_runtime299.JSX.Element;
|
|
17
17
|
//#endregion
|
|
18
18
|
export { toggleVariants as n, Toggle$1 as t };
|
|
19
|
-
//# sourceMappingURL=toggle-
|
|
19
|
+
//# sourceMappingURL=toggle-CASEgcGG.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-
|
|
1
|
+
{"version":3,"file":"toggle-CASEgcGG.d.ts","names":[],"sources":["../src/components/toggle.tsx"],"sourcesContent":[],"mappings":";;;;;;cAOM;;;IAwBL,gCAAA,CAAA;AA5BiE,iBA8BzD,QAAA,CAFR;EAAA,SAAA;EAAA,OAAA;EAAA,IAAA;EAAA,GAAA;AAAA,CAAA,EAOE,MAAA,CAAgB,KAPlB,GAO0B,YAP1B,CAAA,OAO8C,cAP9C,CAAA,CAAA,EAO6D,oBAAA,CAAA,GAAA,CAAA,OAP7D"}
|
|
@@ -4,11 +4,12 @@ import { cva } from "class-variance-authority";
|
|
|
4
4
|
import { Toggle } from "@base-ui/react/toggle";
|
|
5
5
|
|
|
6
6
|
//#region src/components/toggle.tsx
|
|
7
|
-
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none
|
|
7
|
+
const toggleVariants = cva("group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", {
|
|
8
8
|
variants: {
|
|
9
9
|
variant: {
|
|
10
|
-
default: "bg-transparent",
|
|
11
|
-
outline: "border border-input bg-transparent shadow-xs hover:bg-muted"
|
|
10
|
+
default: "bg-transparent hover:bg-muted hover:text-foreground aria-pressed:bg-muted",
|
|
11
|
+
outline: "border border-input bg-transparent shadow-xs hover:bg-muted hover:text-foreground aria-pressed:bg-muted",
|
|
12
|
+
accent: "bg-transparent hover:bg-accent hover:text-accent-foreground aria-pressed:bg-accent aria-pressed:text-accent-foreground"
|
|
12
13
|
},
|
|
13
14
|
size: {
|
|
14
15
|
default: "h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2",
|
|
@@ -35,4 +36,4 @@ function Toggle$1({ className, variant = "default", size = "default", ...props }
|
|
|
35
36
|
|
|
36
37
|
//#endregion
|
|
37
38
|
export { toggleVariants as n, Toggle$1 as t };
|
|
38
|
-
//# sourceMappingURL=toggle-
|
|
39
|
+
//# sourceMappingURL=toggle-lqIyJptS.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toggle-lqIyJptS.js","names":["Toggle","TogglePrimitive"],"sources":["../src/components/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@px-ui/ui/lib/utils\";\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default:\n \"bg-transparent hover:bg-muted hover:text-foreground aria-pressed:bg-muted\",\n outline:\n \"border border-input bg-transparent shadow-xs hover:bg-muted hover:text-foreground aria-pressed:bg-muted\",\n accent:\n \"bg-transparent hover:bg-accent hover:text-accent-foreground aria-pressed:bg-accent aria-pressed:text-accent-foreground\",\n },\n size: {\n default:\n \"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n sm: \"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5\",\n lg: \"h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;AAOA,MAAM,iBAAiB,IACrB,kdACA;CACE,UAAU;EACR,SAAS;GACP,SACE;GACF,SACE;GACF,QACE;GACH;EACD,MAAM;GACJ,SACE;GACF,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,SAASA,SAAO,EACd,WACA,UAAU,WACV,OAAO,WACP,GAAG,SAC2D;AAC9D,QACE,oBAACC;EACC,aAAU;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC3D,GAAI;GACJ"}
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as react_jsx_runtime255 from "react/jsx-runtime";
|
|
2
2
|
import { Tooltip } from "@base-ui/react/tooltip";
|
|
3
3
|
|
|
4
4
|
//#region src/components/tooltip.d.ts
|
|
5
5
|
declare function TooltipProvider({
|
|
6
6
|
delay,
|
|
7
7
|
...props
|
|
8
|
-
}: Tooltip.Provider.Props):
|
|
8
|
+
}: Tooltip.Provider.Props): react_jsx_runtime255.JSX.Element;
|
|
9
9
|
declare function Tooltip$1({
|
|
10
10
|
...props
|
|
11
|
-
}: Tooltip.Root.Props):
|
|
11
|
+
}: Tooltip.Root.Props): react_jsx_runtime255.JSX.Element;
|
|
12
12
|
declare function TooltipTrigger({
|
|
13
13
|
...props
|
|
14
|
-
}: Tooltip.Trigger.Props):
|
|
14
|
+
}: Tooltip.Trigger.Props): react_jsx_runtime255.JSX.Element;
|
|
15
15
|
declare function TooltipContent({
|
|
16
16
|
className,
|
|
17
17
|
side,
|
|
@@ -20,7 +20,7 @@ declare function TooltipContent({
|
|
|
20
20
|
alignOffset,
|
|
21
21
|
children,
|
|
22
22
|
...props
|
|
23
|
-
}: Tooltip.Popup.Props & Pick<Tooltip.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">):
|
|
23
|
+
}: Tooltip.Popup.Props & Pick<Tooltip.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset">): react_jsx_runtime255.JSX.Element;
|
|
24
24
|
//#endregion
|
|
25
25
|
export { TooltipTrigger as i, TooltipContent as n, TooltipProvider as r, Tooltip$1 as t };
|
|
26
|
-
//# sourceMappingURL=tooltip-
|
|
26
|
+
//# sourceMappingURL=tooltip-ChzCP6Bv.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tooltip-
|
|
1
|
+
{"version":3,"file":"tooltip-ChzCP6Bv.d.ts","names":[],"sources":["../src/components/tooltip.tsx"],"sourcesContent":[],"mappings":";;;;iBAIS,eAAA;;;GAGN,OAAA,CAAiB,QAAA,CAAS,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAUzB,SAAA;;GAAsB,OAAA,CAAiB,IAAA,CAAK,QAAK,oBAAA,CAAA,GAAA,CAAA;iBAIjD,cAAA;;GAA6B,OAAA,CAAiB,OAAA,CAAQ,QAAK,oBAAA,CAAA,GAAA,CAAA;AArBA,iBAyB3D,cAAA,CArBe;EAAA,SAAA;EAAA,IAAA;EAAA,UAAA;EAAA,KAAA;EAAA,WAAA;EAAA,QAAA;EAAA,GAAA;AAAA,CAAA,EA6BrB,OAAA,CAAiB,KAAA,CAAM,KA7BF,GA8BtB,IA9BsB,CA+BpB,OAAA,CAAiB,UAAA,CAAW,KA/BR,EAAA,OAAA,GAAA,aAAA,GAAA,MAAA,GAAA,YAAA,CAAA,CAAA,EAiCrB,oBAAA,CAAA,GAAA,CAAA,OAjCqB"}
|
|
@@ -4,7 +4,19 @@ import { QueryKey } from "@tanstack/react-query";
|
|
|
4
4
|
//#region src/hooks/use-async-options.d.ts
|
|
5
5
|
type LoadOptionsData<TData$1> = {
|
|
6
6
|
options: TData$1[];
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Total number of records matching the current search. This is the preferred
|
|
9
|
+
* way to signal pagination: the hook derives `hasMore` by comparing `total`
|
|
10
|
+
* against the accumulated item count across fetched pages, so the loader
|
|
11
|
+
* never has to track prior pages or its own page size.
|
|
12
|
+
*/
|
|
13
|
+
total?: number;
|
|
14
|
+
/**
|
|
15
|
+
* Whether more pages remain. A last-resort fallback for APIs that expose no
|
|
16
|
+
* total to count against (e.g. cursor pagination). Prefer `total`. Takes
|
|
17
|
+
* precedence over `total` when both are present.
|
|
18
|
+
*/
|
|
19
|
+
hasMore?: boolean;
|
|
8
20
|
};
|
|
9
21
|
type LoadOptionsReturn<TData$1> = {
|
|
10
22
|
data: LoadOptionsData<TData$1>;
|
|
@@ -47,4 +59,4 @@ type InferOption<T> = T extends LoadOptionsConfig<infer TData> ? TData : never;
|
|
|
47
59
|
type InferOptions<T> = T extends LoadOptionsConfig<infer TData> ? TData[] : never;
|
|
48
60
|
//#endregion
|
|
49
61
|
export { useAsyncOptions as a, defineLoadOptions as i, InferOptions as n, LoadOptionsConfig as r, InferOption as t };
|
|
50
|
-
//# sourceMappingURL=use-async-options-
|
|
62
|
+
//# sourceMappingURL=use-async-options-CD5BgoHR.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-async-options-CD5BgoHR.d.ts","names":[],"sources":["../src/hooks/use-async-options.ts"],"sourcesContent":[],"mappings":";;;;KAKK;WACM;;AAL6D;AAKxD;AAiBO;;;EAQT,KAAA,CAAA,EAAA,MAAA;EAAR;;AAEN;;;EAGY,OAAA,CAAA,EAAA,OAAA;CAGR;KAjBC,iBAkBD,CAAA,OAAA,CAAA,GAAA;EACA,IAAA,EAlBI,eAkBJ,CAlBoB,OAkBpB,CAAA;EACA,KAAA,EAAA,GAAA;;KAfC;;;UAGK;MACJ,QAAQ,kBAAkB;iBAEhB;EAqGJ,QAAA,EAnGE,QAmGF;EACA,MAAA,EAnGA,aAmGA,CAnGc,OAmGd,CAAA;CACY,EAAA;EAAA,MAAA;EAAA,UAAA;EAAA,KAAA;EAAA;CAAA,EAAA;EAAd,MAAA,EAAA,OAAA;EAAa,UAAA,EAAA,MAAA;EAGP,KAAA,CAAA,EAAA,OAAA;EACiB,WAAA,CAAA,EAAA,OAAA;CAAlB,CAAA,EAAA;EAAwB,KAAA,SAAA,EAAA;EAAA,SAAA,EAAA,OAAA;EAAA,aAAA,EAAA,OAAA;EAK3B,OAAA,EAAA,OAAW;EAEX,OAAA,EAAA,OAAY;EACtB,aAAA,EAAA,OAAA;EAAU,UAAA,EAAA,GAAA,GAAA,IAAA;EAAiC,MAAA,+CAAA,oCAAA,gBAAA,QAAA,CAAA,EAAA,OAAA,CAAA,OAAA,CAAA;CAAK;KAdtC;YACA;UACF,cAAc;;iBAGR,8CACD,kBAAkB,WAAM,kBAAA;KAK3B,iBACV,UAAU;KACA,kBACV,UAAU,iCAAiC"}
|
|
@@ -21,11 +21,14 @@ function useAsyncOptions(params, { isOpen, inputValue, eager = false, localFilte
|
|
|
21
21
|
enabled: isOpen || eager,
|
|
22
22
|
initialPageParam: 1,
|
|
23
23
|
staleTime: () => isFetchedAfterMount.current ? Infinity : 0,
|
|
24
|
-
getNextPageParam: (lastPage, allPages) =>
|
|
24
|
+
getNextPageParam: (lastPage, allPages) => {
|
|
25
|
+
if (typeof lastPage.hasMore === "boolean") return lastPage.hasMore ? allPages.length + 1 : void 0;
|
|
26
|
+
if (typeof lastPage.total === "number") return allPages.reduce((count, page) => count + page.options.length, 0) < lastPage.total ? allPages.length + 1 : void 0;
|
|
27
|
+
},
|
|
25
28
|
retry: false
|
|
26
29
|
});
|
|
27
30
|
if (query.isFetchedAfterMount && !isFetchedAfterMount.current) isFetchedAfterMount.current = true;
|
|
28
|
-
if (localFilter && !isFullyLoaded.current && effectiveSearch === "" && query.isSuccess && query.data.pages.length === 1 && query.
|
|
31
|
+
if (localFilter && !isFullyLoaded.current && effectiveSearch === "" && query.isSuccess && query.data.pages.length === 1 && query.hasNextPage === false) isFullyLoaded.current = true;
|
|
29
32
|
const items = useMemo(() => query.data?.pages.flatMap((page) => page.options) ?? EMPTY_ITEMS, [query.data?.pages]);
|
|
30
33
|
const handleLoadMore = useCallback(() => {
|
|
31
34
|
query.fetchNextPage();
|
|
@@ -47,4 +50,4 @@ function defineLoadOptions(loadOptions) {
|
|
|
47
50
|
|
|
48
51
|
//#endregion
|
|
49
52
|
export { useAsyncOptions as n, defineLoadOptions as t };
|
|
50
|
-
//# sourceMappingURL=use-async-options-
|
|
53
|
+
//# sourceMappingURL=use-async-options-CcsImGX4.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"use-async-options-CcsImGX4.js","names":["EMPTY_ITEMS: readonly unknown[]"],"sources":["../src/hooks/use-async-options.ts"],"sourcesContent":["import { useCallback, useMemo, useRef } from \"react\";\nimport { useInfiniteQuery, type QueryKey } from \"@tanstack/react-query\";\n\nconst EMPTY_ITEMS: readonly unknown[] = Object.freeze([]);\n\ntype LoadOptionsData<TData> = {\n options: TData[];\n /**\n * Total number of records matching the current search. This is the preferred\n * way to signal pagination: the hook derives `hasMore` by comparing `total`\n * against the accumulated item count across fetched pages, so the loader\n * never has to track prior pages or its own page size.\n */\n total?: number;\n /**\n * Whether more pages remain. A last-resort fallback for APIs that expose no\n * total to count against (e.g. cursor pagination). Prefer `total`. Takes\n * precedence over `total` when both are present.\n */\n hasMore?: boolean;\n};\n\ntype LoadOptionsReturn<TData> = {\n data: LoadOptionsData<TData>;\n error: any;\n};\n\ntype LoadOptionsFn<TData> = (params: {\n search: string;\n page: number;\n signal: AbortSignal;\n}) => Promise<LoadOptionsReturn<TData>>;\n\nexport function useAsyncOptions<TData = any>(\n params: {\n cacheKey: QueryKey;\n loader: LoadOptionsFn<TData>;\n },\n {\n isOpen,\n inputValue,\n eager = false,\n localFilter = false,\n }: {\n isOpen: boolean;\n inputValue: string;\n eager?: boolean;\n localFilter?: boolean;\n },\n) {\n const isFetchedAfterMount = useRef(false);\n // Once the initial empty-search page reports `hasMore: false`, the entire\n // dataset is already in memory — freeze the query search so typing filters\n // locally instead of refetching.\n const isFullyLoaded = useRef(false);\n\n const effectiveSearch =\n localFilter && isFullyLoaded.current ? \"\" : inputValue;\n\n const query = useInfiniteQuery({\n queryKey: [...params.cacheKey, effectiveSearch],\n queryFn: async ({ pageParam, signal }) => {\n const { error, data } = await params.loader({\n search: effectiveSearch,\n page: pageParam,\n signal,\n });\n\n if (error) {\n throw new Error(error);\n }\n\n return data;\n },\n enabled: isOpen || eager,\n initialPageParam: 1,\n staleTime: () => (isFetchedAfterMount.current ? Infinity : 0),\n getNextPageParam: (lastPage, allPages) => {\n // Explicit hasMore from the server wins.\n if (typeof lastPage.hasMore === \"boolean\") {\n return lastPage.hasMore ? allPages.length + 1 : undefined;\n }\n // Otherwise derive it from total vs. the accumulated item count —\n // allPages already holds every page React Query has fetched.\n if (typeof lastPage.total === \"number\") {\n const loaded = allPages.reduce(\n (count, page) => count + page.options.length,\n 0,\n );\n return loaded < lastPage.total ? allPages.length + 1 : undefined;\n }\n return undefined;\n },\n retry: false,\n });\n\n if (query.isFetchedAfterMount && !isFetchedAfterMount.current) {\n isFetchedAfterMount.current = true;\n }\n\n if (\n localFilter &&\n !isFullyLoaded.current &&\n effectiveSearch === \"\" &&\n query.isSuccess &&\n query.data.pages.length === 1 &&\n query.hasNextPage === false\n ) {\n isFullyLoaded.current = true;\n }\n\n const items = useMemo(\n () =>\n (query.data?.pages.flatMap((page) => page.options) ??\n EMPTY_ITEMS) as TData[],\n [query.data?.pages],\n );\n\n const handleLoadMore = useCallback(() => {\n query.fetchNextPage();\n }, [query.fetchNextPage]);\n\n return {\n items,\n isLoading: query.isLoading,\n isLoadingMore: query.isFetchingNextPage,\n hasMore: query.hasNextPage,\n isError: query.isError,\n isLocalFilter: localFilter && isFullyLoaded.current,\n onLoadMore: handleLoadMore,\n _query: query,\n };\n}\n\nexport type LoadOptionsConfig<TData> = {\n cacheKey: QueryKey;\n loader: LoadOptionsFn<TData>;\n};\n\nexport function defineLoadOptions<TData = any>(\n loadOptions: LoadOptionsConfig<TData>,\n) {\n return loadOptions;\n}\n\nexport type InferOption<T> =\n T extends LoadOptionsConfig<infer TData> ? TData : never;\nexport type InferOptions<T> =\n T extends LoadOptionsConfig<infer TData> ? TData[] : never;\n"],"mappings":";;;;AAGA,MAAMA,cAAkC,OAAO,OAAO,EAAE,CAAC;AA8BzD,SAAgB,gBACd,QAIA,EACE,QACA,YACA,QAAQ,OACR,cAAc,SAOhB;CACA,MAAM,sBAAsB,OAAO,MAAM;CAIzC,MAAM,gBAAgB,OAAO,MAAM;CAEnC,MAAM,kBACJ,eAAe,cAAc,UAAU,KAAK;CAE9C,MAAM,QAAQ,iBAAiB;EAC7B,UAAU,CAAC,GAAG,OAAO,UAAU,gBAAgB;EAC/C,SAAS,OAAO,EAAE,WAAW,aAAa;GACxC,MAAM,EAAE,OAAO,SAAS,MAAM,OAAO,OAAO;IAC1C,QAAQ;IACR,MAAM;IACN;IACD,CAAC;AAEF,OAAI,MACF,OAAM,IAAI,MAAM,MAAM;AAGxB,UAAO;;EAET,SAAS,UAAU;EACnB,kBAAkB;EAClB,iBAAkB,oBAAoB,UAAU,WAAW;EAC3D,mBAAmB,UAAU,aAAa;AAExC,OAAI,OAAO,SAAS,YAAY,UAC9B,QAAO,SAAS,UAAU,SAAS,SAAS,IAAI;AAIlD,OAAI,OAAO,SAAS,UAAU,SAK5B,QAJe,SAAS,QACrB,OAAO,SAAS,QAAQ,KAAK,QAAQ,QACtC,EACD,GACe,SAAS,QAAQ,SAAS,SAAS,IAAI;;EAI3D,OAAO;EACR,CAAC;AAEF,KAAI,MAAM,uBAAuB,CAAC,oBAAoB,QACpD,qBAAoB,UAAU;AAGhC,KACE,eACA,CAAC,cAAc,WACf,oBAAoB,MACpB,MAAM,aACN,MAAM,KAAK,MAAM,WAAW,KAC5B,MAAM,gBAAgB,MAEtB,eAAc,UAAU;CAG1B,MAAM,QAAQ,cAET,MAAM,MAAM,MAAM,SAAS,SAAS,KAAK,QAAQ,IAChD,aACJ,CAAC,MAAM,MAAM,MAAM,CACpB;CAED,MAAM,iBAAiB,kBAAkB;AACvC,QAAM,eAAe;IACpB,CAAC,MAAM,cAAc,CAAC;AAEzB,QAAO;EACL;EACA,WAAW,MAAM;EACjB,eAAe,MAAM;EACrB,SAAS,MAAM;EACf,SAAS,MAAM;EACf,eAAe,eAAe,cAAc;EAC5C,YAAY;EACZ,QAAQ;EACT;;AAQH,SAAgB,kBACd,aACA;AACA,QAAO"}
|
package/package.json
CHANGED
package/dist/input-ibkmH2IB.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime151 from "react/jsx-runtime";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/input.d.ts
|
|
5
|
-
declare function Input({
|
|
6
|
-
className,
|
|
7
|
-
type,
|
|
8
|
-
...props
|
|
9
|
-
}: React$1.ComponentProps<"input">): react_jsx_runtime151.JSX.Element;
|
|
10
|
-
//#endregion
|
|
11
|
-
export { Input as t };
|
|
12
|
-
//# sourceMappingURL=input-ibkmH2IB.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input-ibkmH2IB.d.ts","names":[],"sources":["../src/components/input.tsx"],"sourcesContent":[],"mappings":";;;;iBAKS,KAAA;;;;GAAqC,OAAA,CAAM,0BAAuB,oBAAA,CAAA,GAAA,CAAA"}
|
package/dist/label-ScNzLnIz.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime165 from "react/jsx-runtime";
|
|
2
|
-
import * as React$1 from "react";
|
|
3
|
-
|
|
4
|
-
//#region src/components/label.d.ts
|
|
5
|
-
declare function Label({
|
|
6
|
-
className,
|
|
7
|
-
...props
|
|
8
|
-
}: React$1.ComponentProps<"label">): react_jsx_runtime165.JSX.Element;
|
|
9
|
-
//#endregion
|
|
10
|
-
export { Label as t };
|
|
11
|
-
//# sourceMappingURL=label-ScNzLnIz.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label-ScNzLnIz.d.ts","names":[],"sources":["../src/components/label.tsx"],"sourcesContent":[],"mappings":";;;;iBAMS,KAAA;;;GAA+B,OAAA,CAAM,0BAAuB,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separator-BNtM8qCY.d.ts","names":[],"sources":["../src/components/separator.tsx"],"sourcesContent":[],"mappings":";;;;iBAIS,WAAA;;;;GAIN,SAAA,CAAmB,QAAK,oBAAA,CAAA,GAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-DhJ_qwgw.js","names":["Toggle","TogglePrimitive"],"sources":["../src/components/toggle.tsx"],"sourcesContent":["\"use client\";\n\nimport { Toggle as TogglePrimitive } from \"@base-ui/react/toggle\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"@px-ui/ui/lib/utils\";\n\nconst toggleVariants = cva(\n \"group/toggle inline-flex items-center justify-center gap-1 rounded-md text-sm font-medium whitespace-nowrap transition-[color,box-shadow] outline-none hover:bg-muted hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-destructive/20 aria-pressed:bg-muted dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n {\n variants: {\n variant: {\n default: \"bg-transparent\",\n outline: \"border border-input bg-transparent shadow-xs hover:bg-muted\",\n },\n size: {\n default:\n \"h-9 min-w-9 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n sm: \"h-8 min-w-8 px-2.5 has-data-[icon=inline-end]:pe-1.5 has-data-[icon=inline-start]:ps-1.5\",\n lg: \"h-10 min-w-10 px-2.5 has-data-[icon=inline-end]:pe-2 has-data-[icon=inline-start]:ps-2\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nfunction Toggle({\n className,\n variant = \"default\",\n size = \"default\",\n ...props\n}: TogglePrimitive.Props & VariantProps<typeof toggleVariants>) {\n return (\n <TogglePrimitive\n data-slot=\"toggle\"\n className={cn(toggleVariants({ variant, size, className }))}\n {...props}\n />\n );\n}\n\nexport { Toggle, toggleVariants };\n"],"mappings":";;;;;;AAOA,MAAM,iBAAiB,IACrB,6gBACA;CACE,UAAU;EACR,SAAS;GACP,SAAS;GACT,SAAS;GACV;EACD,MAAM;GACJ,SACE;GACF,IAAI;GACJ,IAAI;GACL;EACF;CACD,iBAAiB;EACf,SAAS;EACT,MAAM;EACP;CACF,CACF;AAED,SAASA,SAAO,EACd,WACA,UAAU,WACV,OAAO,WACP,GAAG,SAC2D;AAC9D,QACE,oBAACC;EACC,aAAU;EACV,WAAW,GAAG,eAAe;GAAE;GAAS;GAAM;GAAW,CAAC,CAAC;EAC3D,GAAI;GACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"use-async-options-BtuWFvWZ.js","names":["EMPTY_ITEMS: readonly unknown[]"],"sources":["../src/hooks/use-async-options.ts"],"sourcesContent":["import { useCallback, useMemo, useRef } from \"react\";\nimport { useInfiniteQuery, type QueryKey } from \"@tanstack/react-query\";\n\nconst EMPTY_ITEMS: readonly unknown[] = Object.freeze([]);\n\ntype LoadOptionsData<TData> = {\n options: TData[];\n hasMore: boolean;\n};\n\ntype LoadOptionsReturn<TData> = {\n data: LoadOptionsData<TData>;\n error: any;\n};\n\ntype LoadOptionsFn<TData> = (params: {\n search: string;\n page: number;\n signal: AbortSignal;\n}) => Promise<LoadOptionsReturn<TData>>;\n\nexport function useAsyncOptions<TData = any>(\n params: {\n cacheKey: QueryKey;\n loader: LoadOptionsFn<TData>;\n },\n {\n isOpen,\n inputValue,\n eager = false,\n localFilter = false,\n }: {\n isOpen: boolean;\n inputValue: string;\n eager?: boolean;\n localFilter?: boolean;\n },\n) {\n const isFetchedAfterMount = useRef(false);\n // Once the initial empty-search page reports `hasMore: false`, the entire\n // dataset is already in memory — freeze the query search so typing filters\n // locally instead of refetching.\n const isFullyLoaded = useRef(false);\n\n const effectiveSearch =\n localFilter && isFullyLoaded.current ? \"\" : inputValue;\n\n const query = useInfiniteQuery({\n queryKey: [...params.cacheKey, effectiveSearch],\n queryFn: async ({ pageParam, signal }) => {\n const { error, data } = await params.loader({\n search: effectiveSearch,\n page: pageParam,\n signal,\n });\n\n if (error) {\n throw new Error(error);\n }\n\n return data;\n },\n enabled: isOpen || eager,\n initialPageParam: 1,\n staleTime: () => (isFetchedAfterMount.current ? Infinity : 0),\n getNextPageParam: (lastPage, allPages) =>\n lastPage.hasMore ? allPages.length + 1 : undefined,\n retry: false,\n });\n\n if (query.isFetchedAfterMount && !isFetchedAfterMount.current) {\n isFetchedAfterMount.current = true;\n }\n\n if (\n localFilter &&\n !isFullyLoaded.current &&\n effectiveSearch === \"\" &&\n query.isSuccess &&\n query.data.pages.length === 1 &&\n query.data.pages[0]?.hasMore === false\n ) {\n isFullyLoaded.current = true;\n }\n\n const items = useMemo(\n () =>\n (query.data?.pages.flatMap((page) => page.options) ??\n EMPTY_ITEMS) as TData[],\n [query.data?.pages],\n );\n\n const handleLoadMore = useCallback(() => {\n query.fetchNextPage();\n }, [query.fetchNextPage]);\n\n return {\n items,\n isLoading: query.isLoading,\n isLoadingMore: query.isFetchingNextPage,\n hasMore: query.hasNextPage,\n isError: query.isError,\n isLocalFilter: localFilter && isFullyLoaded.current,\n onLoadMore: handleLoadMore,\n _query: query,\n };\n}\n\nexport type LoadOptionsConfig<TData> = {\n cacheKey: QueryKey;\n loader: LoadOptionsFn<TData>;\n};\n\nexport function defineLoadOptions<TData = any>(\n loadOptions: LoadOptionsConfig<TData>,\n) {\n return loadOptions;\n}\n\nexport type InferOption<T> =\n T extends LoadOptionsConfig<infer TData> ? TData : never;\nexport type InferOptions<T> =\n T extends LoadOptionsConfig<infer TData> ? TData[] : never;\n"],"mappings":";;;;AAGA,MAAMA,cAAkC,OAAO,OAAO,EAAE,CAAC;AAkBzD,SAAgB,gBACd,QAIA,EACE,QACA,YACA,QAAQ,OACR,cAAc,SAOhB;CACA,MAAM,sBAAsB,OAAO,MAAM;CAIzC,MAAM,gBAAgB,OAAO,MAAM;CAEnC,MAAM,kBACJ,eAAe,cAAc,UAAU,KAAK;CAE9C,MAAM,QAAQ,iBAAiB;EAC7B,UAAU,CAAC,GAAG,OAAO,UAAU,gBAAgB;EAC/C,SAAS,OAAO,EAAE,WAAW,aAAa;GACxC,MAAM,EAAE,OAAO,SAAS,MAAM,OAAO,OAAO;IAC1C,QAAQ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