@vritti/quantum-ui 0.3.6 → 0.3.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.js +5 -5
- package/dist/Checkbox2.js +2 -2
- package/dist/ConfirmHost.js +109 -0
- package/dist/ConfirmHost.js.map +1 -0
- package/dist/Dialog.js +82 -64
- package/dist/Dialog.js.map +1 -1
- package/dist/DropdownMenu.js +2 -2
- package/dist/DropdownMenu.js.map +1 -1
- package/dist/Form.js +50 -26
- package/dist/Form.js.map +1 -1
- package/dist/Progress.js +2 -2
- package/dist/RadioGroup.js +2 -2
- package/dist/Sidebar.js +1 -1
- package/dist/Switch.js +2 -2
- package/dist/TabsSkeleton.js +1 -1
- package/dist/Toggle.js +1 -1
- package/dist/ViewTabs.js +1 -2
- package/dist/ViewTabs.js.map +1 -1
- package/dist/assets/quantum-ui.css +43 -5
- package/dist/cells.js +96 -64
- package/dist/cells.js.map +1 -1
- package/dist/components/ConfirmHost.js +2 -0
- package/dist/components/ConfirmHost.js.map +1 -0
- package/dist/components/Dialog.js +1 -1
- package/dist/components/RichTextEditor.js +1 -1
- package/dist/context/index.js +0 -1
- package/dist/context/index.js.map +1 -1
- package/dist/dropdown-menu.js +4 -3
- package/dist/dropdown-menu.js.map +1 -1
- package/dist/image-component.js +1 -1
- package/dist/index.js +3 -3
- package/dist/index12.js +3 -2
- package/dist/index12.js.map +1 -1
- package/dist/index13.js +3 -2
- package/dist/index13.js.map +1 -1
- package/dist/index14.js +7 -6
- package/dist/index14.js.map +1 -1
- package/dist/index15.js +1 -1
- package/dist/index16.js +1 -1
- package/dist/index18.js +1 -1
- package/dist/index20.js +1 -1
- package/dist/index21.js +1 -1
- package/dist/index23.js +1 -1
- package/dist/index25.js +3 -2534
- package/dist/index25.js.map +1 -1
- package/dist/index26.js +2526 -22
- package/dist/index26.js.map +1 -1
- package/dist/index27.js +32 -4
- package/dist/index27.js.map +1 -1
- package/dist/index28.js +4 -37
- package/dist/index28.js.map +1 -1
- package/dist/index29.js +1101 -287
- package/dist/index29.js.map +1 -1
- package/dist/index30.js +36 -8
- package/dist/index30.js.map +1 -1
- package/dist/index31.js +305 -25
- package/dist/index31.js.map +1 -1
- package/dist/index32.js +8 -60
- package/dist/index32.js.map +1 -1
- package/dist/index33.js +30 -11
- package/dist/index33.js.map +1 -1
- package/dist/index34.js +59 -35
- package/dist/index34.js.map +1 -1
- package/dist/index35.js +10 -36818
- package/dist/index35.js.map +1 -1
- package/dist/index36.js +36 -79
- package/dist/index36.js.map +1 -1
- package/dist/index37.js +36808 -184
- package/dist/index37.js.map +1 -1
- package/dist/index38.js +84 -0
- package/dist/index38.js.map +1 -0
- package/dist/index39.js +199 -0
- package/dist/index39.js.map +1 -0
- package/dist/index4.js +1 -1
- package/dist/lib/components/ConfirmHost/ConfirmHost.d.ts +39 -0
- package/dist/lib/components/ConfirmHost/ConfirmHost.d.ts.map +1 -0
- package/dist/lib/components/ConfirmHost/index.d.ts +2 -0
- package/dist/lib/components/ConfirmHost/index.d.ts.map +1 -0
- package/dist/lib/components/DataTable/components/DataTableImportDialog.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableViewTabs.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/DataTableViewsMenu.d.ts.map +1 -1
- package/dist/lib/components/DataTable/components/RowActions.d.ts.map +1 -1
- package/dist/lib/components/Dialog/Dialog.d.ts +15 -17
- package/dist/lib/components/Dialog/Dialog.d.ts.map +1 -1
- package/dist/lib/components/Dialog/index.d.ts +2 -2
- package/dist/lib/components/Dialog/index.d.ts.map +1 -1
- package/dist/lib/components/DropdownMenu/types.d.ts +2 -2
- package/dist/lib/components/DropdownMenu/types.d.ts.map +1 -1
- package/dist/lib/components/Form/Form.d.ts.map +1 -1
- package/dist/lib/components/index.d.ts +1 -0
- package/dist/lib/components/index.d.ts.map +1 -1
- package/dist/lib/context/index.d.ts +0 -1
- package/dist/lib/context/index.d.ts.map +1 -1
- package/dist/lib/hooks/useConfirm.d.ts +3 -3
- package/dist/lib/hooks/useConfirm.d.ts.map +1 -1
- package/dist/trash-2.js +17 -3
- package/dist/trash-2.js.map +1 -1
- package/dist/useConfirm.js +3 -7
- package/dist/useConfirm.js.map +1 -1
- package/dist/utils/motion.js +2 -2
- package/dist/value.js +1 -1
- package/package.json +5 -1
- package/dist/Combination.js +0 -1129
- package/dist/Combination.js.map +0 -1
- package/dist/ConfirmContext.js +0 -77
- package/dist/ConfirmContext.js.map +0 -1
- package/dist/lib/context/ConfirmContext.d.ts +0 -26
- package/dist/lib/context/ConfirmContext.d.ts.map +0 -1
- package/dist/plus.js +0 -18
- package/dist/plus.js.map +0 -1
package/dist/cells.js
CHANGED
|
@@ -3,7 +3,7 @@ import { c as cn } from './utils.js';
|
|
|
3
3
|
import { S as Skeleton } from './Skeleton.js';
|
|
4
4
|
import { a as useDialog, u as useConfirm } from './useConfirm.js';
|
|
5
5
|
import { B as Button } from './Button.js';
|
|
6
|
-
import { D as Dialog } from './Dialog.js';
|
|
6
|
+
import { D as Dialog, a as DialogActions } from './Dialog.js';
|
|
7
7
|
import { D as DropdownMenu } from './DropdownMenu.js';
|
|
8
8
|
import { c as createLucideIcon } from './createLucideIcon.js';
|
|
9
9
|
import { useMutation, useQueryClient, useQuery } from '@tanstack/react-query';
|
|
@@ -19,6 +19,7 @@ import { a as Eye, E as EyeOff } from './eye.js';
|
|
|
19
19
|
import { B as Badge } from './Badge.js';
|
|
20
20
|
import { F as Form } from './Form.js';
|
|
21
21
|
import { U as UploadFile } from './UploadFile.js';
|
|
22
|
+
import { U as Upload } from './upload.js';
|
|
22
23
|
import { T as TextAlignJustify, D as Download } from './text-align-justify.js';
|
|
23
24
|
import { C as CircleCheck } from './circle-check.js';
|
|
24
25
|
import { S as Select, a as SelectTrigger, b as SelectValue, c as SelectContent, d as SelectItem } from './select2.js';
|
|
@@ -36,7 +37,8 @@ import { a as Switch } from './Switch.js';
|
|
|
36
37
|
import { a, o as object, s as string } from './schemas.js';
|
|
37
38
|
import { T as TextField } from './TextField.js';
|
|
38
39
|
import { S as Save, a as Share2 } from './share-2.js';
|
|
39
|
-
import { P as Pencil, T as Trash2 } from './trash-2.js';
|
|
40
|
+
import { P as Pencil, a as Plus, T as Trash2 } from './trash-2.js';
|
|
41
|
+
import { T as TriangleAlert } from './triangle-alert.js';
|
|
40
42
|
import { pluralize } from './utils/pluralize.js';
|
|
41
43
|
import { C as Checkbox } from './Checkbox.js';
|
|
42
44
|
import { g as getConfig } from './index7.js';
|
|
@@ -18018,6 +18020,8 @@ const DirectAction = ({ action, disabledAll }) => {
|
|
|
18018
18020
|
Dialog,
|
|
18019
18021
|
{
|
|
18020
18022
|
handle: dialog,
|
|
18023
|
+
icon: action.icon,
|
|
18024
|
+
iconVariant: action.variant === "destructive" ? "destructive" : "default",
|
|
18021
18025
|
title: action.dialog.title,
|
|
18022
18026
|
description: action.dialog.description,
|
|
18023
18027
|
badgeSlot: action.dialog.badgeSlot,
|
|
@@ -21627,6 +21631,7 @@ function DataTableImportDialog({
|
|
|
21627
21631
|
Dialog,
|
|
21628
21632
|
{
|
|
21629
21633
|
handle: dialogHandle,
|
|
21634
|
+
icon: Upload,
|
|
21630
21635
|
title,
|
|
21631
21636
|
description,
|
|
21632
21637
|
className: !isUploadStep && result && !result.success ? "max-w-3xl" : void 0,
|
|
@@ -21707,19 +21712,30 @@ function CreateViewDialog({ tableSlug, open, onClose }) {
|
|
|
21707
21712
|
return /* @__PURE__ */ jsx(
|
|
21708
21713
|
Dialog,
|
|
21709
21714
|
{
|
|
21710
|
-
mode: "form",
|
|
21711
21715
|
handle,
|
|
21716
|
+
icon: Plus,
|
|
21712
21717
|
title: "Create New View",
|
|
21713
21718
|
description: "Save the current filters and sort as a named view.",
|
|
21714
|
-
|
|
21715
|
-
|
|
21716
|
-
|
|
21717
|
-
|
|
21718
|
-
|
|
21719
|
-
|
|
21720
|
-
|
|
21721
|
-
|
|
21722
|
-
|
|
21719
|
+
content: (close) => /* @__PURE__ */ jsxs(
|
|
21720
|
+
Form,
|
|
21721
|
+
{
|
|
21722
|
+
form,
|
|
21723
|
+
mutation: mut,
|
|
21724
|
+
className: "space-y-4",
|
|
21725
|
+
transformSubmit: (data) => ({
|
|
21726
|
+
name: data.name.trim(),
|
|
21727
|
+
tableSlug,
|
|
21728
|
+
state: useDataTableStore.getState().tables[tableSlug]?.activeState ?? EMPTY_TABLE_STATE
|
|
21729
|
+
}),
|
|
21730
|
+
children: [
|
|
21731
|
+
/* @__PURE__ */ jsx(TextField, { name: "name", label: "View name", placeholder: "e.g. High Region Providers" }),
|
|
21732
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
21733
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: close, children: "Cancel" }),
|
|
21734
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", loadingText: "Saving...", children: "Save" })
|
|
21735
|
+
] })
|
|
21736
|
+
]
|
|
21737
|
+
}
|
|
21738
|
+
)
|
|
21723
21739
|
}
|
|
21724
21740
|
);
|
|
21725
21741
|
}
|
|
@@ -21749,18 +21765,29 @@ function RenameViewDialog({ tableSlug, open, onClose, initialName }) {
|
|
|
21749
21765
|
return /* @__PURE__ */ jsx(
|
|
21750
21766
|
Dialog,
|
|
21751
21767
|
{
|
|
21752
|
-
mode: "form",
|
|
21753
21768
|
handle,
|
|
21769
|
+
icon: Pencil,
|
|
21754
21770
|
title: "Rename View",
|
|
21755
21771
|
description: `Change the name of "${initialName}".`,
|
|
21756
|
-
|
|
21757
|
-
|
|
21758
|
-
|
|
21759
|
-
|
|
21760
|
-
|
|
21761
|
-
|
|
21762
|
-
|
|
21763
|
-
|
|
21772
|
+
content: (close) => /* @__PURE__ */ jsxs(
|
|
21773
|
+
Form,
|
|
21774
|
+
{
|
|
21775
|
+
form,
|
|
21776
|
+
mutation: mut,
|
|
21777
|
+
className: "space-y-4",
|
|
21778
|
+
transformSubmit: (data) => ({
|
|
21779
|
+
id: activeViewId ?? "",
|
|
21780
|
+
name: data.name.trim()
|
|
21781
|
+
}),
|
|
21782
|
+
children: [
|
|
21783
|
+
/* @__PURE__ */ jsx(TextField, { name: "name", label: "View name" }),
|
|
21784
|
+
/* @__PURE__ */ jsxs(DialogActions, { children: [
|
|
21785
|
+
/* @__PURE__ */ jsx(Button, { type: "button", variant: "outline", onClick: close, children: "Cancel" }),
|
|
21786
|
+
/* @__PURE__ */ jsx(Button, { type: "submit", loadingText: "Saving...", children: "Rename" })
|
|
21787
|
+
] })
|
|
21788
|
+
]
|
|
21789
|
+
}
|
|
21790
|
+
)
|
|
21764
21791
|
}
|
|
21765
21792
|
);
|
|
21766
21793
|
}
|
|
@@ -21795,52 +21822,55 @@ function ManageViewsDialog({ tableSlug, open, onClose }) {
|
|
|
21795
21822
|
if (!v) onClose();
|
|
21796
21823
|
}
|
|
21797
21824
|
};
|
|
21798
|
-
return /* @__PURE__ */
|
|
21825
|
+
return /* @__PURE__ */ jsxs(
|
|
21799
21826
|
Dialog,
|
|
21800
21827
|
{
|
|
21801
21828
|
handle,
|
|
21829
|
+
icon: Settings2,
|
|
21802
21830
|
title: "Manage Views",
|
|
21803
21831
|
description: "Share or delete saved views for this table.",
|
|
21804
|
-
|
|
21805
|
-
|
|
21806
|
-
|
|
21807
|
-
|
|
21808
|
-
|
|
21809
|
-
|
|
21810
|
-
|
|
21811
|
-
|
|
21812
|
-
|
|
21813
|
-
|
|
21814
|
-
|
|
21815
|
-
|
|
21816
|
-
|
|
21817
|
-
|
|
21818
|
-
|
|
21819
|
-
|
|
21820
|
-
|
|
21821
|
-
|
|
21822
|
-
|
|
21823
|
-
|
|
21824
|
-
|
|
21825
|
-
|
|
21826
|
-
|
|
21827
|
-
|
|
21828
|
-
|
|
21829
|
-
|
|
21830
|
-
|
|
21831
|
-
|
|
21832
|
-
|
|
21833
|
-
|
|
21834
|
-
|
|
21835
|
-
|
|
21836
|
-
|
|
21837
|
-
|
|
21838
|
-
|
|
21839
|
-
|
|
21840
|
-
|
|
21841
|
-
|
|
21842
|
-
|
|
21843
|
-
|
|
21832
|
+
children: [
|
|
21833
|
+
/* @__PURE__ */ jsxs("div", { className: "flex max-h-80 min-h-32 flex-col gap-1 overflow-y-auto py-1", children: [
|
|
21834
|
+
views.length === 0 && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground text-center py-4", children: "No saved views yet." }),
|
|
21835
|
+
views.map((view) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between rounded-md px-3 py-2 hover:bg-accent/50", children: [
|
|
21836
|
+
/* @__PURE__ */ jsx("span", { className: "text-sm truncate", children: view.name }),
|
|
21837
|
+
view.isOwn && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
21838
|
+
/* @__PURE__ */ jsx(
|
|
21839
|
+
Button,
|
|
21840
|
+
{
|
|
21841
|
+
variant: "ghost",
|
|
21842
|
+
size: "icon",
|
|
21843
|
+
className: "size-7 text-muted-foreground hover:text-foreground",
|
|
21844
|
+
title: view.isShared ? "Make private" : "Share with everyone",
|
|
21845
|
+
onClick: () => shareMut.mutate({ id: view.id, isShared: !view.isShared }),
|
|
21846
|
+
disabled: shareMut.isPending,
|
|
21847
|
+
children: view.isShared ? /* @__PURE__ */ jsx(EyeOff, { className: "size-4" }) : /* @__PURE__ */ jsx(Share2, { className: "size-4" })
|
|
21848
|
+
}
|
|
21849
|
+
),
|
|
21850
|
+
/* @__PURE__ */ jsx(
|
|
21851
|
+
Button,
|
|
21852
|
+
{
|
|
21853
|
+
variant: "ghost",
|
|
21854
|
+
size: "icon",
|
|
21855
|
+
className: "size-7 text-destructive hover:text-destructive",
|
|
21856
|
+
onClick: async () => {
|
|
21857
|
+
const confirmed = await confirm({
|
|
21858
|
+
title: `Delete "${view.name}"?`,
|
|
21859
|
+
description: "This view will be permanently removed.",
|
|
21860
|
+
confirmLabel: "Delete",
|
|
21861
|
+
variant: "destructive"
|
|
21862
|
+
});
|
|
21863
|
+
if (confirmed) deleteMut.mutate(view.id);
|
|
21864
|
+
},
|
|
21865
|
+
disabled: deleteMut.isPending,
|
|
21866
|
+
children: /* @__PURE__ */ jsx(Trash2, { className: "size-4" })
|
|
21867
|
+
}
|
|
21868
|
+
)
|
|
21869
|
+
] })
|
|
21870
|
+
] }, view.id))
|
|
21871
|
+
] }),
|
|
21872
|
+
/* @__PURE__ */ jsx("div", { className: "-mx-6 mt-4 flex flex-col-reverse gap-2 border-t px-6 pt-4 sm:flex-row sm:justify-end", children: /* @__PURE__ */ jsx(Button, { variant: "outline", onClick: onClose, children: "Close" }) })
|
|
21873
|
+
]
|
|
21844
21874
|
}
|
|
21845
21875
|
);
|
|
21846
21876
|
}
|
|
@@ -22027,9 +22057,11 @@ function DataTableViewTabs({ slug }) {
|
|
|
22027
22057
|
Dialog,
|
|
22028
22058
|
{
|
|
22029
22059
|
handle: dirtyGuard,
|
|
22060
|
+
icon: TriangleAlert,
|
|
22061
|
+
iconVariant: "warning",
|
|
22030
22062
|
title: "Unsaved Changes",
|
|
22031
22063
|
description: "This view has unsaved changes. What would you like to do?",
|
|
22032
|
-
|
|
22064
|
+
children: /* @__PURE__ */ jsxs("div", { className: "flex gap-2 justify-end w-full", children: [
|
|
22033
22065
|
/* @__PURE__ */ jsx(
|
|
22034
22066
|
Button,
|
|
22035
22067
|
{
|
|
@@ -22080,7 +22112,7 @@ const densityClasses = {
|
|
|
22080
22112
|
};
|
|
22081
22113
|
const MODE_HEIGHTS = {
|
|
22082
22114
|
page: "calc(100vh - 280px)",
|
|
22083
|
-
tab: "calc(100vh -
|
|
22115
|
+
tab: "calc(100vh - 320px)",
|
|
22084
22116
|
compact: "calc(100vh - 570px)"
|
|
22085
22117
|
};
|
|
22086
22118
|
function buildNoResultsDescription(flags) {
|