mtxuilib 0.0.308 → 0.0.310
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/App.cjs +17 -1
- package/dist/MtmButton.cjs +2 -1
- package/dist/NovelEditorLoader.cjs +8 -4
- package/dist/browser/index.min.js +2 -1
- package/dist/common/FullCenter.cjs +2 -1
- package/dist/common/MtImage.cjs +2 -1
- package/dist/common/mtlink.cjs +2 -1
- package/dist/common/table/cells/ExpenderCell.cjs +9 -4
- package/dist/common/table/cells/SelectCell.cjs +8 -4
- package/dist/common/table/cells/Text.cjs +2 -1
- package/dist/common/table/cells/ViewLink.cjs +8 -4
- package/dist/common/table/cells/container/cellWrapper.cjs +2 -1
- package/dist/common/table/cells/number.cjs +2 -1
- package/dist/common/table/cells/string.cjs +2 -1
- package/dist/common/table/data-table-pagination.cjs +89 -51
- package/dist/common/table/data-table-view-options.cjs +32 -22
- package/dist/common/tailwind-indicator.cjs +9 -1
- package/dist/entry-client.cjs +2 -1
- package/dist/entry-server.cjs +2 -1
- package/dist/esm/App.js +17 -1
- package/dist/esm/MtmButton.js +2 -1
- package/dist/esm/NovelEditorLoader.js +8 -4
- package/dist/esm/common/FullCenter.js +2 -1
- package/dist/esm/common/MtImage.js +2 -1
- package/dist/esm/common/mtlink.js +2 -1
- package/dist/esm/common/table/cells/ExpenderCell.js +9 -4
- package/dist/esm/common/table/cells/SelectCell.js +8 -4
- package/dist/esm/common/table/cells/Text.js +2 -1
- package/dist/esm/common/table/cells/ViewLink.js +8 -4
- package/dist/esm/common/table/cells/container/cellWrapper.js +2 -1
- package/dist/esm/common/table/cells/number.js +2 -1
- package/dist/esm/common/table/cells/string.js +2 -1
- package/dist/esm/common/table/data-table-pagination.js +89 -51
- package/dist/esm/common/table/data-table-view-options.js +32 -22
- package/dist/esm/common/tailwind-indicator.js +9 -1
- package/dist/esm/entry-client.js +2 -1
- package/dist/esm/entry-server.js +2 -1
- package/dist/esm/icons/icons.js +41 -31
- package/dist/esm/index.js +2 -1
- package/dist/esm/lib/connectquery/use-transport.js +2 -1
- package/dist/esm/lib/render copy.js +2 -1
- package/dist/esm/lib/render.js +2 -1
- package/dist/esm/store/MtConnectProvider.js +2 -1
- package/dist/esm/store/ReactQueryProvider.js +18 -10
- package/dist/esm/store/StorybookDecorator.js +5 -4
- package/dist/esm/store/appContext.js +28 -18
- package/dist/esm/store/hydrateCore.js +6 -5
- package/dist/esm/store/logger.context.js +3 -2
- package/dist/esm/store/pageMeta.js +5 -1
- package/dist/esm/tailwind.d.cts +88 -1
- package/dist/esm/ui/accordion.js +19 -11
- package/dist/esm/ui/alert copy.js +4 -3
- package/dist/esm/ui/alert-dialog.js +21 -17
- package/dist/esm/ui/alert.js +4 -3
- package/dist/esm/ui/avatar.js +4 -3
- package/dist/esm/ui/badge.js +2 -2
- package/dist/esm/ui/button.js +2 -1
- package/dist/esm/ui/calendar.js +4 -4
- package/dist/esm/ui/card.js +7 -6
- package/dist/esm/ui/checkbox.js +15 -10
- package/dist/esm/ui/command.js +25 -18
- package/dist/esm/ui/context-menu.js +35 -22
- package/dist/esm/ui/dialog.js +30 -17
- package/dist/esm/ui/drawer.js +28 -18
- package/dist/esm/ui/dropdown-menu.js +35 -22
- package/dist/esm/ui/form copy.js +14 -9
- package/dist/esm/ui/form.js +14 -9
- package/dist/esm/ui/hover-card.js +2 -1
- package/dist/esm/ui/input.js +2 -1
- package/dist/esm/ui/label.js +2 -1
- package/dist/esm/ui/menubar.js +37 -24
- package/dist/esm/ui/navigation-menu.js +36 -25
- package/dist/esm/ui/novel/novel/src/components/editor-bubble-item.js +2 -1
- package/dist/esm/ui/novel/novel/src/components/editor-bubble.js +5 -1
- package/dist/esm/ui/novel/novel/src/components/editor-command-item.js +5 -4
- package/dist/esm/ui/novel/novel/src/components/editor-command.js +21 -14
- package/dist/esm/ui/novel/novel/src/components/editor.js +7 -6
- package/dist/esm/ui/novel/novel/src/extensions/image-resizer.js +2 -1
- package/dist/esm/ui/novel/tailwind/advanced-editor.js +58 -35
- package/dist/esm/ui/novel/tailwind/generative/ai-completion-command.js +45 -30
- package/dist/esm/ui/novel/tailwind/generative/ai-selector-commands.js +37 -28
- package/dist/esm/ui/novel/tailwind/generative/ai-selector.js +58 -43
- package/dist/esm/ui/novel/tailwind/generative/generative-menu-switch.js +23 -15
- package/dist/esm/ui/novel/tailwind/selectors/color-selector.js +78 -55
- package/dist/esm/ui/novel/tailwind/selectors/link-selector.js +58 -50
- package/dist/esm/ui/novel/tailwind/selectors/node-selector.js +31 -19
- package/dist/esm/ui/novel/tailwind/selectors/text-buttons.js +13 -12
- package/dist/esm/ui/novel/tailwind/slash-command.js +12 -11
- package/dist/esm/ui/novel/tailwind/ui/button.js +2 -1
- package/dist/esm/ui/novel/tailwind/ui/command.js +25 -18
- package/dist/esm/ui/novel/tailwind/ui/dialog.js +30 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/crazy-spinner.js +6 -1
- package/dist/esm/ui/novel/tailwind/ui/icons/font-default.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/font-mono.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/font-serif.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/github.js +5 -4
- package/dist/esm/ui/novel/tailwind/ui/icons/loading-circle.js +20 -17
- package/dist/esm/ui/novel/tailwind/ui/icons/magic.js +27 -24
- package/dist/esm/ui/novel/tailwind/ui/menu.js +28 -16
- package/dist/esm/ui/novel/tailwind/ui/popover.js +3 -2
- package/dist/esm/ui/novel/tailwind/ui/scroll-area.js +18 -10
- package/dist/esm/ui/novel/tailwind/ui/separator.js +2 -1
- package/dist/esm/ui/pagination.js +32 -19
- package/dist/esm/ui/popover.js +3 -2
- package/dist/esm/ui/progress.js +15 -10
- package/dist/esm/ui/radio-group.js +7 -5
- package/dist/esm/ui/resizable.js +10 -5
- package/dist/esm/ui/scroll-area.js +26 -18
- package/dist/esm/ui/select.js +37 -26
- package/dist/esm/ui/separator.js +2 -1
- package/dist/esm/ui/sheet.js +24 -14
- package/dist/esm/ui/skeleton.js +2 -1
- package/dist/esm/ui/slider.js +12 -5
- package/dist/esm/ui/sonner.js +2 -1
- package/dist/esm/ui/switch.js +12 -11
- package/dist/esm/ui/table.js +10 -9
- package/dist/esm/ui/tabs.js +4 -3
- package/dist/esm/ui/textarea.js +2 -1
- package/dist/esm/ui/toast.js +14 -9
- package/dist/esm/ui/toaster.js +18 -4
- package/dist/esm/ui/toggle.js +2 -1
- package/dist/esm/ui/tooltip.js +2 -1
- package/dist/esm/ui/ui-mt/NavTag.js +5 -4
- package/dist/esm/ui/ui-mt/SimpleModel.js +12 -11
- package/dist/esm/ui/ui-mt/inputField/InputField.js +27 -20
- package/dist/esm/ui/ui-mt/inputField/SingleUploadForm.js +67 -56
- package/dist/esm/ui/ui-mt/inputField/TextArea.js +20 -16
- package/dist/esm/ui/ui-mt/inputField/TextFileInput.js +18 -15
- package/dist/esm/ui/ui-mt/inputField/select/InputSelect.js +35 -27
- package/dist/esm/ui/ui-mt/inputs/SearchInput.js +2 -1
- package/dist/esm/ui/ui-mt/inputs/searchBar.js +12 -8
- package/dist/esm/ui/ui-mt/skeleton/skeleton-card.js +9 -4
- package/dist/esm/ui/ui-mt/skeleton/skeleton2.js +5 -1
- package/dist/esm/ui/ui-mt/skeleton/skeletons.js +9 -1
- package/dist/esm/ui/ui-vamp/alert.js +30 -24
- package/dist/esm/ui/ui-vamp/avatar.js +12 -7
- package/dist/esm/ui/ui-vamp/button.js +2 -1
- package/dist/esm/ui/ui-vamp/card.js +15 -8
- package/dist/esm/ui/ui-vamp/checkbox.js +15 -8
- package/dist/esm/ui/ui-vamp/chip.js +2 -1
- package/dist/esm/ui/ui-vamp/dropdown.js +7 -6
- package/dist/esm/ui/ui-vamp/external-link.js +9 -4
- package/dist/esm/ui/ui-vamp/headline.js +5 -1
- package/dist/esm/ui/ui-vamp/input.js +3 -2
- package/dist/esm/ui/ui-vamp/keyvalue.js +5 -1
- package/dist/esm/ui/ui-vamp/label.js +2 -1
- package/dist/esm/ui/ui-vamp/mobile-nav-button.js +6 -5
- package/dist/esm/ui/ui-vamp/modal.js +17 -13
- package/dist/esm/ui/ui-vamp/pagination.js +57 -35
- package/dist/esm/ui/ui-vamp/scroll-area.js +5 -4
- package/dist/esm/ui/ui-vamp/skeleton.js +2 -2
- package/dist/esm/ui/ui-vamp/stripe-not-connected-modal.js +13 -2
- package/dist/esm/ui/ui-vamp/textarea.js +12 -8
- package/dist/esm/ui/ui-vamp/toggle-group.js +3 -2
- package/dist/icons/icons.cjs +41 -31
- package/dist/index.cjs +2 -1
- package/dist/lib/connectquery/use-transport.cjs +2 -1
- package/dist/lib/render copy.cjs +2 -1
- package/dist/lib/render.cjs +2 -1
- package/dist/store/MtConnectProvider.cjs +2 -1
- package/dist/store/ReactQueryProvider.cjs +18 -10
- package/dist/store/StorybookDecorator.cjs +5 -4
- package/dist/store/appContext.cjs +28 -28
- package/dist/store/hydrateCore.cjs +6 -5
- package/dist/store/logger.context.cjs +3 -2
- package/dist/store/pageMeta.cjs +5 -1
- package/dist/tailwind.cjs +72 -2
- package/dist/tsconfig.type.tsbuildinfo +1 -1
- package/dist/ui/accordion.cjs +19 -11
- package/dist/ui/alert copy.cjs +4 -3
- package/dist/ui/alert-dialog.cjs +21 -17
- package/dist/ui/alert.cjs +4 -3
- package/dist/ui/avatar.cjs +4 -3
- package/dist/ui/badge.cjs +2 -12
- package/dist/ui/button.cjs +2 -1
- package/dist/ui/calendar.cjs +4 -14
- package/dist/ui/card.cjs +7 -6
- package/dist/ui/checkbox.cjs +15 -10
- package/dist/ui/command.cjs +25 -18
- package/dist/ui/context-menu.cjs +35 -22
- package/dist/ui/dialog.cjs +30 -17
- package/dist/ui/drawer.cjs +28 -18
- package/dist/ui/dropdown-menu.cjs +35 -22
- package/dist/ui/form copy.cjs +14 -9
- package/dist/ui/form.cjs +14 -9
- package/dist/ui/hover-card.cjs +2 -1
- package/dist/ui/input.cjs +2 -1
- package/dist/ui/label.cjs +2 -1
- package/dist/ui/menubar.cjs +37 -24
- package/dist/ui/navigation-menu.cjs +36 -25
- package/dist/ui/novel/novel/src/components/editor-bubble-item.cjs +2 -1
- package/dist/ui/novel/novel/src/components/editor-bubble.cjs +5 -1
- package/dist/ui/novel/novel/src/components/editor-command-item.cjs +5 -4
- package/dist/ui/novel/novel/src/components/editor-command.cjs +21 -14
- package/dist/ui/novel/novel/src/components/editor.cjs +7 -6
- package/dist/ui/novel/novel/src/extensions/image-resizer.cjs +2 -1
- package/dist/ui/novel/tailwind/advanced-editor.cjs +58 -35
- package/dist/ui/novel/tailwind/generative/ai-completion-command.cjs +45 -30
- package/dist/ui/novel/tailwind/generative/ai-selector-commands.cjs +37 -28
- package/dist/ui/novel/tailwind/generative/ai-selector.cjs +58 -43
- package/dist/ui/novel/tailwind/generative/generative-menu-switch.cjs +23 -15
- package/dist/ui/novel/tailwind/selectors/color-selector.cjs +78 -55
- package/dist/ui/novel/tailwind/selectors/link-selector.cjs +58 -50
- package/dist/ui/novel/tailwind/selectors/node-selector.cjs +31 -19
- package/dist/ui/novel/tailwind/selectors/text-buttons.cjs +13 -12
- package/dist/ui/novel/tailwind/slash-command.cjs +12 -11
- package/dist/ui/novel/tailwind/ui/button.cjs +2 -1
- package/dist/ui/novel/tailwind/ui/command.cjs +25 -18
- package/dist/ui/novel/tailwind/ui/dialog.cjs +30 -17
- package/dist/ui/novel/tailwind/ui/icons/crazy-spinner.cjs +6 -1
- package/dist/ui/novel/tailwind/ui/icons/font-default.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/font-mono.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/font-serif.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/github.cjs +5 -4
- package/dist/ui/novel/tailwind/ui/icons/loading-circle.cjs +20 -17
- package/dist/ui/novel/tailwind/ui/icons/magic.cjs +27 -24
- package/dist/ui/novel/tailwind/ui/menu.cjs +28 -16
- package/dist/ui/novel/tailwind/ui/popover.cjs +3 -2
- package/dist/ui/novel/tailwind/ui/scroll-area.cjs +18 -10
- package/dist/ui/novel/tailwind/ui/separator.cjs +2 -1
- package/dist/ui/pagination.cjs +32 -19
- package/dist/ui/popover.cjs +3 -2
- package/dist/ui/progress.cjs +15 -10
- package/dist/ui/radio-group.cjs +7 -5
- package/dist/ui/resizable.cjs +10 -5
- package/dist/ui/scroll-area.cjs +26 -18
- package/dist/ui/select.cjs +37 -26
- package/dist/ui/separator.cjs +2 -1
- package/dist/ui/sheet.cjs +24 -14
- package/dist/ui/skeleton.cjs +2 -1
- package/dist/ui/slider.cjs +12 -5
- package/dist/ui/sonner.cjs +2 -1
- package/dist/ui/switch.cjs +12 -11
- package/dist/ui/table.cjs +10 -9
- package/dist/ui/tabs.cjs +4 -3
- package/dist/ui/textarea.cjs +2 -1
- package/dist/ui/toast.cjs +14 -9
- package/dist/ui/toaster.cjs +18 -4
- package/dist/ui/toggle.cjs +2 -1
- package/dist/ui/tooltip.cjs +2 -1
- package/dist/ui/ui-mt/NavTag.cjs +5 -4
- package/dist/ui/ui-mt/SimpleModel.cjs +12 -11
- package/dist/ui/ui-mt/inputField/InputField.cjs +27 -20
- package/dist/ui/ui-mt/inputField/SingleUploadForm.cjs +67 -56
- package/dist/ui/ui-mt/inputField/TextArea.cjs +20 -16
- package/dist/ui/ui-mt/inputField/TextFileInput.cjs +18 -25
- package/dist/ui/ui-mt/inputField/select/InputSelect.cjs +35 -27
- package/dist/ui/ui-mt/inputs/SearchInput.cjs +2 -1
- package/dist/ui/ui-mt/inputs/searchBar.cjs +12 -8
- package/dist/ui/ui-mt/skeleton/skeleton-card.cjs +9 -4
- package/dist/ui/ui-mt/skeleton/skeleton2.cjs +5 -1
- package/dist/ui/ui-mt/skeleton/skeletons.cjs +9 -1
- package/dist/ui/ui-vamp/alert.cjs +30 -24
- package/dist/ui/ui-vamp/avatar.cjs +12 -7
- package/dist/ui/ui-vamp/button.cjs +2 -1
- package/dist/ui/ui-vamp/card.cjs +15 -18
- package/dist/ui/ui-vamp/checkbox.cjs +15 -8
- package/dist/ui/ui-vamp/chip.cjs +2 -1
- package/dist/ui/ui-vamp/dropdown.cjs +7 -6
- package/dist/ui/ui-vamp/external-link.cjs +9 -4
- package/dist/ui/ui-vamp/headline.cjs +5 -1
- package/dist/ui/ui-vamp/input.cjs +3 -2
- package/dist/ui/ui-vamp/keyvalue.cjs +5 -1
- package/dist/ui/ui-vamp/label.cjs +2 -1
- package/dist/ui/ui-vamp/mobile-nav-button.cjs +6 -5
- package/dist/ui/ui-vamp/modal.cjs +17 -13
- package/dist/ui/ui-vamp/pagination.cjs +57 -35
- package/dist/ui/ui-vamp/scroll-area.cjs +5 -4
- package/dist/ui/ui-vamp/skeleton.cjs +2 -12
- package/dist/ui/ui-vamp/stripe-not-connected-modal.cjs +13 -2
- package/dist/ui/ui-vamp/textarea.cjs +12 -8
- package/dist/ui/ui-vamp/toggle-group.cjs +3 -2
- package/package.json +5 -4
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
1
2
|
import { Suspense, useState } from "react";
|
|
2
3
|
import { TailwindAdvancedEditor } from "./ui/novel/tailwind/advanced-editor";
|
|
3
4
|
const TWEditorLoder = () => {
|
|
4
5
|
const [open, setOpen] = useState(false);
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
7
|
+
/* @__PURE__ */ jsx("button", { onClick: () => {
|
|
8
|
+
console.log("load editor");
|
|
9
|
+
setOpen(true);
|
|
10
|
+
}, children: " load" }),
|
|
11
|
+
open && /* @__PURE__ */ jsx(Suspense, { fallback: /* @__PURE__ */ jsx(Fragment, { children: "loading" }), children: /* @__PURE__ */ jsx(TailwindAdvancedEditor, {}) })
|
|
12
|
+
] });
|
|
9
13
|
};
|
|
10
14
|
export {
|
|
11
15
|
TWEditorLoder
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
const FullCenter = (props) => {
|
|
3
4
|
const { children } = props;
|
|
4
|
-
return /* @__PURE__ */
|
|
5
|
+
return /* @__PURE__ */ jsx("div", { className: "flex h-full w-full items-center justify-center", children: /* @__PURE__ */ jsx("div", { className: "flex-1", children }) });
|
|
5
6
|
};
|
|
6
7
|
export {
|
|
7
8
|
FullCenter
|
|
@@ -17,6 +17,7 @@ var __spreadValues = (a, b) => {
|
|
|
17
17
|
return a;
|
|
18
18
|
};
|
|
19
19
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
20
|
+
import { jsx } from "react/jsx-runtime";
|
|
20
21
|
import Image from "next/image";
|
|
21
22
|
import { isCloudflarePage } from "../lib/utils";
|
|
22
23
|
const normalizeSrc = (src) => {
|
|
@@ -41,7 +42,7 @@ function getImageLoader() {
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
const MtImage = (props) => {
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
+
return /* @__PURE__ */ jsx(
|
|
45
46
|
Image,
|
|
46
47
|
__spreadProps(__spreadValues({}, props), {
|
|
47
48
|
loader: getImageLoader()
|
|
@@ -27,6 +27,7 @@ var __objRest = (source, exclude) => {
|
|
|
27
27
|
}
|
|
28
28
|
return target;
|
|
29
29
|
};
|
|
30
|
+
import { jsx } from "react/jsx-runtime";
|
|
30
31
|
import { Slot } from "@radix-ui/react-slot";
|
|
31
32
|
import Link from "next/link";
|
|
32
33
|
import React from "react";
|
|
@@ -36,7 +37,7 @@ const MtLink = React.forwardRef(
|
|
|
36
37
|
(_a, ref) => {
|
|
37
38
|
var _b = _a, { className, variant, size, asChild = false } = _b, props = __objRest(_b, ["className", "variant", "size", "asChild"]);
|
|
38
39
|
const Comp = asChild ? Slot : Link;
|
|
39
|
-
return /* @__PURE__ */
|
|
40
|
+
return /* @__PURE__ */ jsx(
|
|
40
41
|
Comp,
|
|
41
42
|
__spreadValues({
|
|
42
43
|
className: cn(
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
+
var __defProps = Object.defineProperties;
|
|
4
|
+
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
3
5
|
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
4
6
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
5
7
|
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
@@ -15,17 +17,20 @@ var __spreadValues = (a, b) => {
|
|
|
15
17
|
}
|
|
16
18
|
return a;
|
|
17
19
|
};
|
|
20
|
+
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
21
|
+
import { jsx } from "react/jsx-runtime";
|
|
18
22
|
import { ChevronRight } from "lucide-react";
|
|
19
23
|
import { cn } from "../../../lib/utils";
|
|
20
24
|
const ExpenderCell = (info) => {
|
|
21
|
-
return info.row.getCanExpand() ? /* @__PURE__ */
|
|
25
|
+
return info.row.getCanExpand() ? /* @__PURE__ */ jsx(
|
|
22
26
|
"button",
|
|
23
|
-
__spreadValues({
|
|
27
|
+
__spreadProps(__spreadValues({
|
|
24
28
|
className: "pointer"
|
|
25
29
|
}, {
|
|
26
30
|
onClick: info.row.getToggleExpandedHandler()
|
|
27
|
-
}),
|
|
28
|
-
|
|
31
|
+
}), {
|
|
32
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: cn(info.row.getIsExpanded() && "rotate-90") })
|
|
33
|
+
})
|
|
29
34
|
) : "\u{1F535}";
|
|
30
35
|
};
|
|
31
36
|
export {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select";
|
|
4
5
|
const SelectCell = (info) => {
|
|
@@ -6,13 +7,16 @@ const SelectCell = (info) => {
|
|
|
6
7
|
const onBlur = () => {
|
|
7
8
|
const numValue = parseInt(value);
|
|
8
9
|
};
|
|
9
|
-
return /* @__PURE__ */
|
|
10
|
+
return /* @__PURE__ */ jsx("div", { className: "flex w-full", children: /* @__PURE__ */ jsx("input", { type: "number", value, onChange: (e) => setValue(e.target.value), onBlur, className: "grow" }) });
|
|
10
11
|
};
|
|
11
12
|
const NewSelectCell = ({ placeholder, items }) => {
|
|
12
13
|
const component = (_info) => {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { children: [
|
|
15
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: placeholder || "--" }) }),
|
|
16
|
+
/* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsx(SelectGroup, { children: items == null ? void 0 : items.map((item, i) => {
|
|
17
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: item.value, children: item.label }, i);
|
|
18
|
+
}) }) })
|
|
19
|
+
] }) });
|
|
16
20
|
};
|
|
17
21
|
return component;
|
|
18
22
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
const NewTextCell = ({ enableEdit, placeholder, popup }) => (info) => {
|
|
4
5
|
const initialValue = info.cell.getValue();
|
|
@@ -8,7 +9,7 @@ const NewTextCell = ({ enableEdit, placeholder, popup }) => (info) => {
|
|
|
8
9
|
}, [initialValue]);
|
|
9
10
|
const onBlur = () => {
|
|
10
11
|
};
|
|
11
|
-
return /* @__PURE__ */
|
|
12
|
+
return /* @__PURE__ */ jsx(Fragment, { children: value });
|
|
12
13
|
};
|
|
13
14
|
export {
|
|
14
15
|
NewTextCell
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import Link from "next/link";
|
|
3
4
|
import React from "react";
|
|
4
5
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectTrigger, SelectValue } from "../../../ui/select";
|
|
@@ -7,13 +8,16 @@ const ViewLinkCell = (info) => {
|
|
|
7
8
|
const onBlur = () => {
|
|
8
9
|
const numValue = parseInt(value);
|
|
9
10
|
};
|
|
10
|
-
return /* @__PURE__ */
|
|
11
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Link, { href: "#", children: "res link" }) });
|
|
11
12
|
};
|
|
12
13
|
const NewSelectCell = ({ placeholder, items }) => {
|
|
13
14
|
return (info) => {
|
|
14
|
-
return /* @__PURE__ */
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsxs(Select, { children: [
|
|
16
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "w-[180px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: placeholder || "--" }) }),
|
|
17
|
+
/* @__PURE__ */ jsx(SelectContent, { children: /* @__PURE__ */ jsx(SelectGroup, { children: items == null ? void 0 : items.map((item, i) => {
|
|
18
|
+
return /* @__PURE__ */ jsx(SelectItem, { value: item.value, children: item.label }, i);
|
|
19
|
+
}) }) })
|
|
20
|
+
] }) });
|
|
17
21
|
};
|
|
18
22
|
};
|
|
19
23
|
export {
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
const NumberCell = (info) => {
|
|
4
5
|
const [value, setValue] = React.useState(info.cell.getValue());
|
|
5
6
|
const onBlur = () => {
|
|
6
7
|
const numValue = parseInt(value);
|
|
7
8
|
};
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
+
return /* @__PURE__ */ jsx("div", { className: "flex w-full", children: /* @__PURE__ */ jsx("input", { type: "number", value, onChange: (e) => setValue(e.target.value), onBlur, className: "grow" }) });
|
|
9
10
|
};
|
|
10
11
|
export {
|
|
11
12
|
NumberCell
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import { CellWrapper } from "./container/cellWrapper";
|
|
4
5
|
const StringCell = (info) => {
|
|
@@ -10,7 +11,7 @@ const StringCell = (info) => {
|
|
|
10
11
|
React.useEffect(() => {
|
|
11
12
|
setValue(initialValue);
|
|
12
13
|
}, [initialValue]);
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
+
return /* @__PURE__ */ jsx(CellWrapper, { children: value });
|
|
14
15
|
};
|
|
15
16
|
export {
|
|
16
17
|
StringCell
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import {
|
|
3
4
|
ChevronLeftIcon,
|
|
4
5
|
ChevronRightIcon,
|
|
@@ -10,57 +11,94 @@ import { MtButton } from "../../ui/ui-mt/Button";
|
|
|
10
11
|
function DataTablePagination({
|
|
11
12
|
table
|
|
12
13
|
}) {
|
|
13
|
-
return /* @__PURE__ */
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
/* @__PURE__ */
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
14
|
+
return /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2", children: [
|
|
15
|
+
/* @__PURE__ */ jsxs("div", { className: "text-muted-foreground flex-1 text-sm", children: [
|
|
16
|
+
table.getFilteredSelectedRowModel().rows.length,
|
|
17
|
+
" of",
|
|
18
|
+
" ",
|
|
19
|
+
table.getFilteredRowModel().rows.length,
|
|
20
|
+
" row(s) selected."
|
|
21
|
+
] }),
|
|
22
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
|
|
23
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
24
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Rows per page" }),
|
|
25
|
+
/* @__PURE__ */ jsxs(
|
|
26
|
+
Select,
|
|
27
|
+
{
|
|
28
|
+
value: `${table.getState().pagination.pageSize}`,
|
|
29
|
+
onValueChange: (value) => {
|
|
30
|
+
table.setPageSize(Number(value));
|
|
31
|
+
},
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ jsx(SelectTrigger, { className: "h-8 w-[70px]", children: /* @__PURE__ */ jsx(SelectValue, { placeholder: table.getState().pagination.pageSize }) }),
|
|
34
|
+
/* @__PURE__ */ jsx(SelectContent, { side: "top", children: [10, 20, 30, 40, 50].map((pageSize) => /* @__PURE__ */ jsx(SelectItem, { value: `${pageSize}`, children: pageSize }, pageSize)) })
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
] }),
|
|
39
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
40
|
+
"Page ",
|
|
41
|
+
table.getState().pagination.pageIndex + 1,
|
|
42
|
+
" of",
|
|
43
|
+
" ",
|
|
44
|
+
table.getPageCount()
|
|
45
|
+
] }),
|
|
46
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
47
|
+
/* @__PURE__ */ jsxs(
|
|
48
|
+
MtButton,
|
|
49
|
+
{
|
|
50
|
+
variant: "outline",
|
|
51
|
+
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
52
|
+
onClick: () => table.setPageIndex(0),
|
|
53
|
+
disabled: !table.getCanPreviousPage(),
|
|
54
|
+
children: [
|
|
55
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to first page" }),
|
|
56
|
+
/* @__PURE__ */ jsx(DoubleArrowLeftIcon, { className: "h-4 w-4" })
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
),
|
|
60
|
+
/* @__PURE__ */ jsxs(
|
|
61
|
+
MtButton,
|
|
62
|
+
{
|
|
63
|
+
variant: "outline",
|
|
64
|
+
className: "h-8 w-8 p-0",
|
|
65
|
+
onClick: () => table.previousPage(),
|
|
66
|
+
disabled: !table.getCanPreviousPage(),
|
|
67
|
+
children: [
|
|
68
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to previous page" }),
|
|
69
|
+
/* @__PURE__ */ jsx(ChevronLeftIcon, { className: "h-4 w-4" })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
),
|
|
73
|
+
/* @__PURE__ */ jsxs(
|
|
74
|
+
MtButton,
|
|
75
|
+
{
|
|
76
|
+
variant: "outline",
|
|
77
|
+
className: "h-8 w-8 p-0",
|
|
78
|
+
onClick: () => table.nextPage(),
|
|
79
|
+
disabled: !table.getCanNextPage(),
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to next page" }),
|
|
82
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "h-4 w-4" })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
),
|
|
86
|
+
/* @__PURE__ */ jsxs(
|
|
87
|
+
MtButton,
|
|
88
|
+
{
|
|
89
|
+
variant: "outline",
|
|
90
|
+
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
91
|
+
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
|
92
|
+
disabled: !table.getCanNextPage(),
|
|
93
|
+
children: [
|
|
94
|
+
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Go to last page" }),
|
|
95
|
+
/* @__PURE__ */ jsx(DoubleArrowRightIcon, { className: "h-4 w-4" })
|
|
96
|
+
]
|
|
97
|
+
}
|
|
98
|
+
)
|
|
99
|
+
] })
|
|
100
|
+
] })
|
|
101
|
+
] });
|
|
64
102
|
}
|
|
65
103
|
export {
|
|
66
104
|
DataTablePagination
|
|
@@ -1,33 +1,43 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
import { MixerHorizontalIcon } from "@radix-ui/react-icons";
|
|
3
4
|
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from "../../ui/dropdown-menu";
|
|
4
5
|
import { MtButton } from "../../ui/ui-mt/Button";
|
|
5
6
|
function DataTableViewOptions({
|
|
6
7
|
table
|
|
7
8
|
}) {
|
|
8
|
-
return /* @__PURE__ */
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
variant: "outline",
|
|
12
|
-
size: "sm",
|
|
13
|
-
className: "ml-auto hidden h-8 lg:flex"
|
|
14
|
-
},
|
|
15
|
-
/* @__PURE__ */ React.createElement(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }),
|
|
16
|
-
"View"
|
|
17
|
-
)), /* @__PURE__ */ React.createElement(DropdownMenuContent, { align: "end", className: "w-[150px]" }, /* @__PURE__ */ React.createElement(DropdownMenuLabel, null, "Toggle columns"), /* @__PURE__ */ React.createElement(DropdownMenuSeparator, null), table.getAllColumns().filter(
|
|
18
|
-
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
19
|
-
).map((column) => {
|
|
20
|
-
return /* @__PURE__ */ React.createElement(
|
|
21
|
-
DropdownMenuCheckboxItem,
|
|
9
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
10
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
11
|
+
MtButton,
|
|
22
12
|
{
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
13
|
+
variant: "outline",
|
|
14
|
+
size: "sm",
|
|
15
|
+
className: "ml-auto hidden h-8 lg:flex",
|
|
16
|
+
children: [
|
|
17
|
+
/* @__PURE__ */ jsx(MixerHorizontalIcon, { className: "mr-2 h-4 w-4" }),
|
|
18
|
+
"View"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
) }),
|
|
22
|
+
/* @__PURE__ */ jsxs(DropdownMenuContent, { align: "end", className: "w-[150px]", children: [
|
|
23
|
+
/* @__PURE__ */ jsx(DropdownMenuLabel, { children: "Toggle columns" }),
|
|
24
|
+
/* @__PURE__ */ jsx(DropdownMenuSeparator, {}),
|
|
25
|
+
table.getAllColumns().filter(
|
|
26
|
+
(column) => typeof column.accessorFn !== "undefined" && column.getCanHide()
|
|
27
|
+
).map((column) => {
|
|
28
|
+
return /* @__PURE__ */ jsx(
|
|
29
|
+
DropdownMenuCheckboxItem,
|
|
30
|
+
{
|
|
31
|
+
className: "capitalize",
|
|
32
|
+
checked: column.getIsVisible(),
|
|
33
|
+
onCheckedChange: (value) => column.toggleVisibility(!!value),
|
|
34
|
+
children: column.id
|
|
35
|
+
},
|
|
36
|
+
column.id
|
|
37
|
+
);
|
|
38
|
+
})
|
|
39
|
+
] })
|
|
40
|
+
] });
|
|
31
41
|
}
|
|
32
42
|
export {
|
|
33
43
|
DataTableViewOptions
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
"use client";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
3
|
const TailwindIndicator = () => {
|
|
3
4
|
if (true)
|
|
4
5
|
return null;
|
|
5
|
-
return /* @__PURE__ */
|
|
6
|
+
return /* @__PURE__ */ jsxs("div", { className: "fixed bottom-1 left-1 z-50 flex h-6 w-6 items-center justify-center rounded-full bg-gray-800 p-3 font-mono text-xs text-white", children: [
|
|
7
|
+
/* @__PURE__ */ jsx("div", { className: "block sm:hidden", children: "xs" }),
|
|
8
|
+
/* @__PURE__ */ jsx("div", { className: "hidden sm:block md:hidden", children: "sm" }),
|
|
9
|
+
/* @__PURE__ */ jsx("div", { className: "hidden md:block lg:hidden", children: "md" }),
|
|
10
|
+
/* @__PURE__ */ jsx("div", { className: "hidden lg:block xl:hidden", children: "lg" }),
|
|
11
|
+
/* @__PURE__ */ jsx("div", { className: "hidden xl:block 2xl:hidden", children: "xl" }),
|
|
12
|
+
/* @__PURE__ */ jsx("div", { className: "hidden 2xl:block", children: "2xl" })
|
|
13
|
+
] });
|
|
6
14
|
};
|
|
7
15
|
export {
|
|
8
16
|
TailwindIndicator
|
package/dist/esm/entry-client.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import "./index.css";
|
|
2
3
|
import React from "react";
|
|
3
4
|
import ReactDOM from "react-dom/client";
|
|
4
5
|
import App from "./App";
|
|
5
6
|
ReactDOM.hydrateRoot(
|
|
6
7
|
document.getElementById("root"),
|
|
7
|
-
/* @__PURE__ */
|
|
8
|
+
/* @__PURE__ */ jsx(React.StrictMode, { children: /* @__PURE__ */ jsx(App, {}) })
|
|
8
9
|
);
|
package/dist/esm/entry-server.js
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { jsx } from "react/jsx-runtime";
|
|
1
2
|
import React from "react";
|
|
2
3
|
import ReactDOMServer from "react-dom/server";
|
|
3
4
|
import App from "./App";
|
|
4
5
|
function render() {
|
|
5
6
|
const html = ReactDOMServer.renderToString(
|
|
6
|
-
/* @__PURE__ */
|
|
7
|
+
/* @__PURE__ */ jsx(React.StrictMode, { children: /* @__PURE__ */ jsx(App, {}) })
|
|
7
8
|
);
|
|
8
9
|
console.log("html", html);
|
|
9
10
|
return { html };
|