hazo_ui 4.1.1 → 4.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGE_LOG.md +17 -0
- package/README.md +97 -0
- package/dist/index.cjs +362 -19
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +229 -38
- package/dist/index.d.ts +229 -38
- package/dist/index.js +355 -18
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ import Link from '@tiptap/extension-link';
|
|
|
41
41
|
import TextAlign from '@tiptap/extension-text-align';
|
|
42
42
|
import Highlight from '@tiptap/extension-highlight';
|
|
43
43
|
import Color from '@tiptap/extension-color';
|
|
44
|
-
import
|
|
44
|
+
import Image2 from '@tiptap/extension-image';
|
|
45
45
|
import Placeholder from '@tiptap/extension-placeholder';
|
|
46
46
|
import HorizontalRule from '@tiptap/extension-horizontal-rule';
|
|
47
47
|
import { Table } from '@tiptap/extension-table';
|
|
@@ -60,6 +60,8 @@ import '@uiw/react-markdown-preview/markdown.css';
|
|
|
60
60
|
import Suggestion from '@tiptap/suggestion';
|
|
61
61
|
import { PluginKey } from '@tiptap/pm/state';
|
|
62
62
|
import { createPortal } from 'react-dom';
|
|
63
|
+
import Cropper from 'react-easy-crop';
|
|
64
|
+
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
63
65
|
import { Drawer as Drawer$1 } from 'vaul';
|
|
64
66
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
65
67
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
@@ -72,7 +74,6 @@ import * as ScrollAreaPrimitive from '@radix-ui/react-scroll-area';
|
|
|
72
74
|
import * as TogglePrimitive from '@radix-ui/react-toggle';
|
|
73
75
|
import * as ToggleGroupPrimitive from '@radix-ui/react-toggle-group';
|
|
74
76
|
import * as AlertDialogPrimitive from '@radix-ui/react-alert-dialog';
|
|
75
|
-
import * as SliderPrimitive from '@radix-ui/react-slider';
|
|
76
77
|
import { Toaster, toast } from 'sonner';
|
|
77
78
|
export { toast as rawToast } from 'sonner';
|
|
78
79
|
import { useHazoState } from 'hazo_state/client';
|
|
@@ -4297,7 +4298,7 @@ var HazoUiRte = ({
|
|
|
4297
4298
|
multicolor: true
|
|
4298
4299
|
}),
|
|
4299
4300
|
Color,
|
|
4300
|
-
|
|
4301
|
+
Image2.configure({
|
|
4301
4302
|
inline: true,
|
|
4302
4303
|
allowBase64: true,
|
|
4303
4304
|
HTMLAttributes: {
|
|
@@ -5833,7 +5834,9 @@ var HardBreak = Node.create({
|
|
|
5833
5834
|
const marks = storedMarks || selection.$to.parentOffset && selection.$from.marks();
|
|
5834
5835
|
return chain().insertContent({ type: this.name }).command(({ tr, dispatch }) => {
|
|
5835
5836
|
if (dispatch && marks && keepMarks) {
|
|
5836
|
-
const filteredMarks = marks.filter(
|
|
5837
|
+
const filteredMarks = marks.filter(
|
|
5838
|
+
(mark) => splittableMarks.includes(mark.type.name)
|
|
5839
|
+
);
|
|
5837
5840
|
tr.ensureMarks(filteredMarks);
|
|
5838
5841
|
}
|
|
5839
5842
|
return true;
|
|
@@ -6845,6 +6848,210 @@ function HazoUiConfirmDialog({
|
|
|
6845
6848
|
)
|
|
6846
6849
|
] }) });
|
|
6847
6850
|
}
|
|
6851
|
+
var Slider = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6852
|
+
SliderPrimitive.Root,
|
|
6853
|
+
{
|
|
6854
|
+
ref,
|
|
6855
|
+
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
6856
|
+
...props,
|
|
6857
|
+
children: [
|
|
6858
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
6859
|
+
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
6860
|
+
]
|
|
6861
|
+
}
|
|
6862
|
+
));
|
|
6863
|
+
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
6864
|
+
async function getCroppedImg(imageSrc, areaPixels, outputSize, quality) {
|
|
6865
|
+
const img = await new Promise((resolve, reject) => {
|
|
6866
|
+
const image = new Image();
|
|
6867
|
+
image.crossOrigin = "anonymous";
|
|
6868
|
+
image.onload = () => resolve(image);
|
|
6869
|
+
image.onerror = (e) => reject(e);
|
|
6870
|
+
image.src = imageSrc;
|
|
6871
|
+
});
|
|
6872
|
+
const canvas = document.createElement("canvas");
|
|
6873
|
+
canvas.width = outputSize;
|
|
6874
|
+
canvas.height = outputSize;
|
|
6875
|
+
const ctx = canvas.getContext("2d");
|
|
6876
|
+
if (!ctx) {
|
|
6877
|
+
throw new Error("HazoUiImageCropper: canvas 2d context unavailable");
|
|
6878
|
+
}
|
|
6879
|
+
ctx.drawImage(
|
|
6880
|
+
img,
|
|
6881
|
+
areaPixels.x,
|
|
6882
|
+
areaPixels.y,
|
|
6883
|
+
areaPixels.width,
|
|
6884
|
+
areaPixels.height,
|
|
6885
|
+
0,
|
|
6886
|
+
0,
|
|
6887
|
+
outputSize,
|
|
6888
|
+
outputSize
|
|
6889
|
+
);
|
|
6890
|
+
return new Promise((resolve, reject) => {
|
|
6891
|
+
canvas.toBlob(
|
|
6892
|
+
(blob) => {
|
|
6893
|
+
if (blob) {
|
|
6894
|
+
resolve(blob);
|
|
6895
|
+
} else {
|
|
6896
|
+
reject(new Error("HazoUiImageCropper: canvas.toBlob returned null"));
|
|
6897
|
+
}
|
|
6898
|
+
},
|
|
6899
|
+
"image/webp",
|
|
6900
|
+
quality
|
|
6901
|
+
);
|
|
6902
|
+
});
|
|
6903
|
+
}
|
|
6904
|
+
var HazoUiImageCropper = React26.forwardRef(function HazoUiImageCropper2({
|
|
6905
|
+
imageSrc,
|
|
6906
|
+
onCropped,
|
|
6907
|
+
outputSize = 512,
|
|
6908
|
+
quality = 0.9,
|
|
6909
|
+
zoomLabel = "Zoom",
|
|
6910
|
+
className
|
|
6911
|
+
}, ref) {
|
|
6912
|
+
const [crop, set_crop] = React26.useState({
|
|
6913
|
+
x: 0,
|
|
6914
|
+
y: 0
|
|
6915
|
+
});
|
|
6916
|
+
const [zoom, set_zoom] = React26.useState(1);
|
|
6917
|
+
const cropped_area_pixels_ref = React26.useRef(null);
|
|
6918
|
+
const handle_crop_complete = React26.useCallback(
|
|
6919
|
+
(_croppedArea, croppedAreaPixels) => {
|
|
6920
|
+
cropped_area_pixels_ref.current = croppedAreaPixels;
|
|
6921
|
+
},
|
|
6922
|
+
[]
|
|
6923
|
+
);
|
|
6924
|
+
React26.useImperativeHandle(
|
|
6925
|
+
ref,
|
|
6926
|
+
() => ({
|
|
6927
|
+
getCroppedBlob: async () => {
|
|
6928
|
+
if (!cropped_area_pixels_ref.current) {
|
|
6929
|
+
throw new Error(
|
|
6930
|
+
"HazoUiImageCropper: crop area not yet initialised \u2014 wait for the cropper to mount before calling getCroppedBlob."
|
|
6931
|
+
);
|
|
6932
|
+
}
|
|
6933
|
+
const blob = await getCroppedImg(
|
|
6934
|
+
imageSrc,
|
|
6935
|
+
cropped_area_pixels_ref.current,
|
|
6936
|
+
outputSize,
|
|
6937
|
+
quality
|
|
6938
|
+
);
|
|
6939
|
+
await onCropped?.(blob);
|
|
6940
|
+
return blob;
|
|
6941
|
+
}
|
|
6942
|
+
}),
|
|
6943
|
+
[imageSrc, onCropped, outputSize, quality]
|
|
6944
|
+
);
|
|
6945
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("cls_image_cropper_root flex flex-col gap-4", className), children: [
|
|
6946
|
+
/* @__PURE__ */ jsx(
|
|
6947
|
+
"div",
|
|
6948
|
+
{
|
|
6949
|
+
className: "cls_cropper_stage relative w-full overflow-hidden rounded-lg bg-muted",
|
|
6950
|
+
style: { height: "320px" },
|
|
6951
|
+
children: /* @__PURE__ */ jsx(
|
|
6952
|
+
Cropper,
|
|
6953
|
+
{
|
|
6954
|
+
image: imageSrc,
|
|
6955
|
+
crop,
|
|
6956
|
+
zoom,
|
|
6957
|
+
aspect: 1,
|
|
6958
|
+
cropShape: "round",
|
|
6959
|
+
showGrid: false,
|
|
6960
|
+
onCropChange: set_crop,
|
|
6961
|
+
onZoomChange: set_zoom,
|
|
6962
|
+
onCropComplete: handle_crop_complete
|
|
6963
|
+
}
|
|
6964
|
+
)
|
|
6965
|
+
}
|
|
6966
|
+
),
|
|
6967
|
+
/* @__PURE__ */ jsxs("div", { className: "cls_zoom_control flex flex-col gap-1.5", children: [
|
|
6968
|
+
/* @__PURE__ */ jsx(
|
|
6969
|
+
"label",
|
|
6970
|
+
{
|
|
6971
|
+
className: "cls_zoom_label text-sm font-medium text-foreground",
|
|
6972
|
+
id: "hazo-cropper-zoom-label",
|
|
6973
|
+
children: zoomLabel
|
|
6974
|
+
}
|
|
6975
|
+
),
|
|
6976
|
+
/* @__PURE__ */ jsx(
|
|
6977
|
+
Slider,
|
|
6978
|
+
{
|
|
6979
|
+
"aria-labelledby": "hazo-cropper-zoom-label",
|
|
6980
|
+
min: 1,
|
|
6981
|
+
max: 3,
|
|
6982
|
+
step: 0.1,
|
|
6983
|
+
value: [zoom],
|
|
6984
|
+
onValueChange: (values) => set_zoom(values[0])
|
|
6985
|
+
}
|
|
6986
|
+
)
|
|
6987
|
+
] })
|
|
6988
|
+
] });
|
|
6989
|
+
});
|
|
6990
|
+
HazoUiImageCropper.displayName = "HazoUiImageCropper";
|
|
6991
|
+
function HazoUiImageCropperDialog({
|
|
6992
|
+
open,
|
|
6993
|
+
onOpenChange,
|
|
6994
|
+
file,
|
|
6995
|
+
onConfirm,
|
|
6996
|
+
onCancel,
|
|
6997
|
+
title = "Crop photo",
|
|
6998
|
+
confirmLabel = "Save",
|
|
6999
|
+
cancelLabel = "Cancel",
|
|
7000
|
+
zoomLabel = "Zoom",
|
|
7001
|
+
outputSize = 512,
|
|
7002
|
+
quality = 0.9
|
|
7003
|
+
}) {
|
|
7004
|
+
const cropper_ref = React26.useRef(null);
|
|
7005
|
+
const [image_src, set_image_src] = React26.useState(null);
|
|
7006
|
+
const [is_confirming, set_is_confirming] = React26.useState(false);
|
|
7007
|
+
React26.useEffect(() => {
|
|
7008
|
+
if (!file) {
|
|
7009
|
+
set_image_src(null);
|
|
7010
|
+
return;
|
|
7011
|
+
}
|
|
7012
|
+
const url = URL.createObjectURL(file);
|
|
7013
|
+
set_image_src(url);
|
|
7014
|
+
return () => {
|
|
7015
|
+
URL.revokeObjectURL(url);
|
|
7016
|
+
};
|
|
7017
|
+
}, [file]);
|
|
7018
|
+
const handle_confirm = async () => {
|
|
7019
|
+
if (!cropper_ref.current) return;
|
|
7020
|
+
set_is_confirming(true);
|
|
7021
|
+
try {
|
|
7022
|
+
const blob = await cropper_ref.current.getCroppedBlob();
|
|
7023
|
+
await onConfirm(blob);
|
|
7024
|
+
onOpenChange(false);
|
|
7025
|
+
} finally {
|
|
7026
|
+
set_is_confirming(false);
|
|
7027
|
+
}
|
|
7028
|
+
};
|
|
7029
|
+
return /* @__PURE__ */ jsx(
|
|
7030
|
+
HazoUiDialog,
|
|
7031
|
+
{
|
|
7032
|
+
open,
|
|
7033
|
+
onOpenChange,
|
|
7034
|
+
title,
|
|
7035
|
+
actionButtonText: confirmLabel,
|
|
7036
|
+
cancelButtonText: cancelLabel,
|
|
7037
|
+
onConfirm: handle_confirm,
|
|
7038
|
+
onCancel,
|
|
7039
|
+
actionButtonLoading: is_confirming,
|
|
7040
|
+
sizeWidth: "min(90vw, 520px)",
|
|
7041
|
+
contentClassName: "cls_image_cropper_dialog_body",
|
|
7042
|
+
children: image_src && /* @__PURE__ */ jsx(
|
|
7043
|
+
HazoUiImageCropper,
|
|
7044
|
+
{
|
|
7045
|
+
ref: cropper_ref,
|
|
7046
|
+
imageSrc: image_src,
|
|
7047
|
+
outputSize,
|
|
7048
|
+
quality,
|
|
7049
|
+
zoomLabel
|
|
7050
|
+
}
|
|
7051
|
+
)
|
|
7052
|
+
}
|
|
7053
|
+
);
|
|
7054
|
+
}
|
|
6848
7055
|
var Drawer = ({
|
|
6849
7056
|
shouldScaleBackground = true,
|
|
6850
7057
|
...props
|
|
@@ -7391,19 +7598,6 @@ function ButtonGroupText({ className, asChild = false, ...props }) {
|
|
|
7391
7598
|
function ButtonGroupSeparator({ className, orientation = "vertical", ...props }) {
|
|
7392
7599
|
return /* @__PURE__ */ jsx(Separator3, { orientation, className: cn("bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto", className), ...props });
|
|
7393
7600
|
}
|
|
7394
|
-
var Slider = React26.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7395
|
-
SliderPrimitive.Root,
|
|
7396
|
-
{
|
|
7397
|
-
ref,
|
|
7398
|
-
className: cn("relative flex w-full touch-none select-none items-center", className),
|
|
7399
|
-
...props,
|
|
7400
|
-
children: [
|
|
7401
|
-
/* @__PURE__ */ jsx(SliderPrimitive.Track, { className: "relative h-2 w-full grow overflow-hidden rounded-full bg-secondary", children: /* @__PURE__ */ jsx(SliderPrimitive.Range, { className: "absolute h-full bg-primary" }) }),
|
|
7402
|
-
/* @__PURE__ */ jsx(SliderPrimitive.Thumb, { className: "block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" })
|
|
7403
|
-
]
|
|
7404
|
-
}
|
|
7405
|
-
));
|
|
7406
|
-
Slider.displayName = SliderPrimitive.Root.displayName;
|
|
7407
7601
|
var InputAffix = React26.forwardRef(
|
|
7408
7602
|
({ className, containerClassName, prefix, suffix, type = "text", ...props }, ref) => {
|
|
7409
7603
|
return /* @__PURE__ */ jsxs(
|
|
@@ -7713,6 +7907,149 @@ function ProgressiveImage({
|
|
|
7713
7907
|
}
|
|
7714
7908
|
);
|
|
7715
7909
|
}
|
|
7910
|
+
function NotificationCountBadge({
|
|
7911
|
+
count,
|
|
7912
|
+
max = 9,
|
|
7913
|
+
className
|
|
7914
|
+
}) {
|
|
7915
|
+
if (count <= 0) return null;
|
|
7916
|
+
const isOverflow = count > max;
|
|
7917
|
+
const label = isOverflow ? `${max}+` : String(count);
|
|
7918
|
+
return /* @__PURE__ */ jsx(
|
|
7919
|
+
"span",
|
|
7920
|
+
{
|
|
7921
|
+
"aria-label": `${count} unread`,
|
|
7922
|
+
className: cn(
|
|
7923
|
+
"cls_notification_count_badge",
|
|
7924
|
+
"inline-flex items-center justify-center",
|
|
7925
|
+
"bg-destructive text-destructive-foreground",
|
|
7926
|
+
"text-[10px] font-semibold leading-none select-none",
|
|
7927
|
+
// pill for "9+", circle for single/double digits
|
|
7928
|
+
isOverflow ? "rounded-full px-1.5 py-0.5 min-w-[1.25rem] h-5" : "rounded-full w-5 h-5",
|
|
7929
|
+
className
|
|
7930
|
+
),
|
|
7931
|
+
children: label
|
|
7932
|
+
}
|
|
7933
|
+
);
|
|
7934
|
+
}
|
|
7935
|
+
function NotificationItem({
|
|
7936
|
+
isRead,
|
|
7937
|
+
timestamp,
|
|
7938
|
+
children,
|
|
7939
|
+
actions,
|
|
7940
|
+
onClick,
|
|
7941
|
+
onContextMenu,
|
|
7942
|
+
onMarkRead,
|
|
7943
|
+
markReadLabel
|
|
7944
|
+
}) {
|
|
7945
|
+
const handleMarkRead = (e) => {
|
|
7946
|
+
e.stopPropagation();
|
|
7947
|
+
onMarkRead?.();
|
|
7948
|
+
};
|
|
7949
|
+
return /* @__PURE__ */ jsxs(
|
|
7950
|
+
"div",
|
|
7951
|
+
{
|
|
7952
|
+
role: "listitem",
|
|
7953
|
+
onClick,
|
|
7954
|
+
onContextMenu,
|
|
7955
|
+
className: cn(
|
|
7956
|
+
"cls_notification_item",
|
|
7957
|
+
"relative flex gap-3 px-4 py-3 text-sm transition-colors",
|
|
7958
|
+
onClick && "cursor-pointer hover:bg-accent/60",
|
|
7959
|
+
!isRead && "bg-primary/5"
|
|
7960
|
+
),
|
|
7961
|
+
children: [
|
|
7962
|
+
/* @__PURE__ */ jsx("div", { className: "cls_notification_item_dot_col flex-shrink-0 pt-1.5", children: !isRead ? /* @__PURE__ */ jsx(
|
|
7963
|
+
"span",
|
|
7964
|
+
{
|
|
7965
|
+
"aria-label": "Unread",
|
|
7966
|
+
className: "cls_notification_item_dot block w-2 h-2 rounded-full bg-primary"
|
|
7967
|
+
}
|
|
7968
|
+
) : /* @__PURE__ */ jsx("span", { className: "block w-2 h-2", "aria-hidden": "true" }) }),
|
|
7969
|
+
/* @__PURE__ */ jsxs("div", { className: "cls_notification_item_body flex-1 min-w-0 space-y-1", children: [
|
|
7970
|
+
/* @__PURE__ */ jsx("div", { className: "cls_notification_item_message leading-snug text-foreground", children }),
|
|
7971
|
+
/* @__PURE__ */ jsxs("div", { className: "cls_notification_item_meta flex items-center gap-3 flex-wrap", children: [
|
|
7972
|
+
/* @__PURE__ */ jsx("span", { className: "cls_notification_item_timestamp text-xs text-muted-foreground", children: timestamp }),
|
|
7973
|
+
!isRead && onMarkRead ? /* @__PURE__ */ jsx(
|
|
7974
|
+
"button",
|
|
7975
|
+
{
|
|
7976
|
+
type: "button",
|
|
7977
|
+
onClick: handleMarkRead,
|
|
7978
|
+
className: "cls_notification_item_mark_read text-primary text-xs hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",
|
|
7979
|
+
children: markReadLabel
|
|
7980
|
+
}
|
|
7981
|
+
) : null
|
|
7982
|
+
] }),
|
|
7983
|
+
actions ? /* @__PURE__ */ jsx("div", { className: "cls_notification_item_actions flex items-center gap-2 pt-1", children: actions }) : null
|
|
7984
|
+
] })
|
|
7985
|
+
]
|
|
7986
|
+
}
|
|
7987
|
+
);
|
|
7988
|
+
}
|
|
7989
|
+
function LoadingSkeletons() {
|
|
7990
|
+
return /* @__PURE__ */ jsx(
|
|
7991
|
+
"div",
|
|
7992
|
+
{
|
|
7993
|
+
"aria-busy": "true",
|
|
7994
|
+
"aria-label": "Loading notifications",
|
|
7995
|
+
className: "cls_notification_panel_loading space-y-0",
|
|
7996
|
+
children: [0, 1, 2].map((i) => /* @__PURE__ */ jsxs(
|
|
7997
|
+
"div",
|
|
7998
|
+
{
|
|
7999
|
+
className: "cls_notification_panel_skeleton flex gap-3 px-4 py-3 animate-pulse",
|
|
8000
|
+
children: [
|
|
8001
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0 pt-1.5", children: /* @__PURE__ */ jsx("div", { className: "w-2 h-2 rounded-full bg-muted" }) }),
|
|
8002
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 space-y-2 pt-0.5", children: [
|
|
8003
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 bg-muted rounded w-3/4" }),
|
|
8004
|
+
/* @__PURE__ */ jsx("div", { className: "h-3 bg-muted rounded w-1/2" }),
|
|
8005
|
+
/* @__PURE__ */ jsx("div", { className: "h-2.5 bg-muted rounded w-1/4 mt-1" })
|
|
8006
|
+
] })
|
|
8007
|
+
]
|
|
8008
|
+
},
|
|
8009
|
+
i
|
|
8010
|
+
))
|
|
8011
|
+
}
|
|
8012
|
+
);
|
|
8013
|
+
}
|
|
8014
|
+
function NotificationPanel({
|
|
8015
|
+
children,
|
|
8016
|
+
onMarkAllRead,
|
|
8017
|
+
markAllReadLabel,
|
|
8018
|
+
emptyState,
|
|
8019
|
+
loading = false,
|
|
8020
|
+
className
|
|
8021
|
+
}) {
|
|
8022
|
+
const hasChildren = React26.Children.count(children) > 0 && children !== null && children !== void 0;
|
|
8023
|
+
return /* @__PURE__ */ jsxs(
|
|
8024
|
+
"div",
|
|
8025
|
+
{
|
|
8026
|
+
className: cn(
|
|
8027
|
+
"cls_notification_panel",
|
|
8028
|
+
"flex flex-col bg-background border border-border rounded-lg overflow-hidden shadow-md",
|
|
8029
|
+
className
|
|
8030
|
+
),
|
|
8031
|
+
children: [
|
|
8032
|
+
/* @__PURE__ */ jsx(
|
|
8033
|
+
"div",
|
|
8034
|
+
{
|
|
8035
|
+
role: "list",
|
|
8036
|
+
className: "cls_notification_panel_list flex-1 overflow-y-auto max-h-[480px] divide-y divide-border",
|
|
8037
|
+
children: loading ? /* @__PURE__ */ jsx(LoadingSkeletons, {}) : hasChildren ? children : emptyState ? /* @__PURE__ */ jsx("div", { className: "cls_notification_panel_empty px-4 py-8 flex items-center justify-center", children: emptyState }) : null
|
|
8038
|
+
}
|
|
8039
|
+
),
|
|
8040
|
+
onMarkAllRead ? /* @__PURE__ */ jsx("div", { className: "cls_notification_panel_footer border-t border-border px-4 py-2 flex justify-center", children: /* @__PURE__ */ jsx(
|
|
8041
|
+
"button",
|
|
8042
|
+
{
|
|
8043
|
+
type: "button",
|
|
8044
|
+
onClick: onMarkAllRead,
|
|
8045
|
+
className: "cls_notification_panel_mark_all text-primary text-xs hover:underline focus:outline-none focus-visible:ring-2 focus-visible:ring-primary rounded",
|
|
8046
|
+
children: markAllReadLabel
|
|
8047
|
+
}
|
|
8048
|
+
) }) : null
|
|
8049
|
+
]
|
|
8050
|
+
}
|
|
8051
|
+
);
|
|
8052
|
+
}
|
|
7716
8053
|
function HazoUiToaster({
|
|
7717
8054
|
position = "bottom-right",
|
|
7718
8055
|
closeButton = true,
|
|
@@ -10515,6 +10852,6 @@ function HazoUiEtaProgress({
|
|
|
10515
10852
|
);
|
|
10516
10853
|
}
|
|
10517
10854
|
|
|
10518
|
-
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LoadingTimeout, MarkdownEditor, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
|
|
10855
|
+
export { ANIMATION_PRESETS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CELEBRATION_GRADIENT, Calendar, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, CelebrationProvider, Checkbox, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, CommandNodeExtension, CommandPill, CommandPopover, DateRangeSelector, Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, ErrorBanner, ErrorPage, FunnelChart, HazoContextProvider, HazoUiConfirmDialog, HazoUiDialog, DialogClose as HazoUiDialogClose, DialogContent as HazoUiDialogContent, DialogDescription as HazoUiDialogDescription, DialogFooter as HazoUiDialogFooter, DialogHeader as HazoUiDialogHeader, DialogOverlay as HazoUiDialogOverlay, DialogPortal as HazoUiDialogPortal, Dialog as HazoUiDialogRoot, DialogTitle as HazoUiDialogTitle, DialogTrigger as HazoUiDialogTrigger, HazoUiEtaProgress, HazoUiFlexInput, HazoUiFlexRadio, HazoUiImageCropper, HazoUiImageCropperDialog, HazoUiKanban, HazoUiKanbanFilter, HazoUiMultiFilterDialog, HazoUiMultiSortDialog, HazoUiPillRadio, HazoUiProgressBar, HazoUiRte, HazoUiTable, HazoUiTextarea, HazoUiTextbox, HazoUiToaster, HoverCard, HoverCardContent, HoverCardTrigger, Input, InputAffix, InverseSparkline, Label3 as Label, LoadingTimeout, MarkdownEditor, NotificationCountBadge, NotificationItem, NotificationPanel, Popover, PopoverContent, PopoverTrigger, ProgressiveImage, RadioGroup, RadioGroupItem, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, Command as ShadcnCommand, CommandEmpty as ShadcnCommandEmpty, CommandGroup as ShadcnCommandGroup, CommandInput as ShadcnCommandInput, CommandItem as ShadcnCommandItem, CommandList as ShadcnCommandList, Skeleton, SkeletonBar, SkeletonCircle, SkeletonGroup, SkeletonRect, Slider, Sparkline, Spinner, StackedBars, Switch, Table2 as Table, TableBody, TableCaption, TableCell2 as TableCell, TableFooter, TableHead, TableHeader2 as TableHeader, TableRow2 as TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Textarea, Toggle, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, applyKanbanFilter, buttonGroupVariants, celebrate, cn, computeEta, create_command_suggestion_extension, easeToward, errorToast, format_num, generateUUID, get_hazo_ui_config, get_logger, median, parse_commands_from_text, pick_x_label_indices, reset_hazo_ui_config, resolve_animation_classes, set_hazo_ui_config, set_logger, successToast, text_to_tiptap_content, toggleVariants, useClickOutside, useCopyToClipboard, useDebounce, useErrorDisplay, useEtaProgress, useFullscreen, useIsMobile, useLoadingState, useLocalStorage, useMediaQuery, useSessionStorage, useViewport, useWakeLock, use_fullscreen, use_wake_lock };
|
|
10519
10856
|
//# sourceMappingURL=index.js.map
|
|
10520
10857
|
//# sourceMappingURL=index.js.map
|