@sustaina/shared-ui 1.56.0 → 1.58.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/dist/index.d.mts +124 -2
- package/dist/index.d.ts +124 -2
- package/dist/index.js +375 -16
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +359 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import { twMerge } from 'tailwind-merge';
|
|
|
7
7
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
8
8
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
9
9
|
import useEmblaCarousel from 'embla-carousel-react';
|
|
10
|
-
import { ChevronLeft, ChevronRight, CircleX, ChevronDown, X, CircleHelp, Clock, Check, Undo, Redo, SearchIcon as SearchIcon$1, Pencil, BaselineIcon, Bold, Italic, Underline, Strikethrough, Code, Pilcrow, Heading1, Heading2, Heading3, List, ListOrdered, QuoteIcon, CodeSquare, LinkIcon, Link2Off, ImageIcon, AlignLeft, AlignCenter, AlignRight, ExternalLink, XIcon, CheckIcon, Triangle, CalendarIcon, Search, ChevronUp, PanelLeftIcon, Minimize2, Maximize2, Plus, MoreVertical, Bug, GripVertical, Info, CircleMinus, Minus } from 'lucide-react';
|
|
10
|
+
import { ChevronLeft, ChevronRight, CircleX, ChevronDown, X, CircleHelp, Clock, Check, Undo, Redo, SearchIcon as SearchIcon$1, Pencil, BaselineIcon, Bold, Italic, Underline, Strikethrough, Code, Pilcrow, Heading1, Heading2, Heading3, List, ListOrdered, QuoteIcon, CodeSquare, LinkIcon, Link2Off, ImageIcon, AlignLeft, AlignCenter, AlignRight, ExternalLink, XIcon, CheckIcon, Triangle, CalendarIcon, Search, ChevronUp, ChevronRightIcon, PanelLeftIcon, Minimize2, Maximize2, Plus, MoreVertical, Bug, GripVertical, Info, CircleMinus, Minus } from 'lucide-react';
|
|
11
11
|
import Autoplay from 'embla-carousel-autoplay';
|
|
12
12
|
import { Slot } from '@radix-ui/react-slot';
|
|
13
13
|
import { cva } from 'class-variance-authority';
|
|
@@ -32,6 +32,7 @@ import ReactDOM from 'react-dom/client';
|
|
|
32
32
|
import { Node as Node$1, mergeAttributes } from '@tiptap/core';
|
|
33
33
|
import Suggestion from '@tiptap/suggestion';
|
|
34
34
|
import { Plugin, PluginKey } from 'prosemirror-state';
|
|
35
|
+
import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
|
|
35
36
|
import * as RadioGroupPrimitive from '@radix-ui/react-radio-group';
|
|
36
37
|
import * as SeparatorPrimitive from '@radix-ui/react-separator';
|
|
37
38
|
import * as SwitchPrimitive from '@radix-ui/react-switch';
|
|
@@ -10122,18 +10123,37 @@ function DialogAlert({
|
|
|
10122
10123
|
func?.();
|
|
10123
10124
|
onOpenChange(false);
|
|
10124
10125
|
}, [onCancel, onConfirm, onOpenChange, showCancel, variant]);
|
|
10126
|
+
const handleOpenChange = useCallback(
|
|
10127
|
+
(state) => {
|
|
10128
|
+
if (!state) {
|
|
10129
|
+
onCancel?.();
|
|
10130
|
+
}
|
|
10131
|
+
onOpenChange(state);
|
|
10132
|
+
},
|
|
10133
|
+
[onCancel, onOpenChange]
|
|
10134
|
+
);
|
|
10125
10135
|
return /* @__PURE__ */ jsx(Dialog3, { open, onOpenChange: persistent ? () => {
|
|
10126
|
-
} :
|
|
10127
|
-
|
|
10128
|
-
|
|
10129
|
-
|
|
10130
|
-
|
|
10131
|
-
|
|
10132
|
-
|
|
10133
|
-
|
|
10134
|
-
|
|
10135
|
-
|
|
10136
|
-
|
|
10136
|
+
} : handleOpenChange, children: /* @__PURE__ */ jsxs(
|
|
10137
|
+
DialogContent3,
|
|
10138
|
+
{
|
|
10139
|
+
className: "max-w-md",
|
|
10140
|
+
showCloseButton: !persistent,
|
|
10141
|
+
onInteractOutside: (e) => {
|
|
10142
|
+
e.preventDefault();
|
|
10143
|
+
},
|
|
10144
|
+
children: [
|
|
10145
|
+
/* @__PURE__ */ jsxs(DialogHeader3, { children: [
|
|
10146
|
+
title && /* @__PURE__ */ jsx(DialogTitle3, { className: titleColorVariant[variant], children: t(title) }),
|
|
10147
|
+
description && /* @__PURE__ */ jsx(DialogDescription3, { children: t(description) })
|
|
10148
|
+
] }),
|
|
10149
|
+
outlet && outlet,
|
|
10150
|
+
/* @__PURE__ */ jsxs("div", { className: `flex gap-2 ${alignClass}`, children: [
|
|
10151
|
+
showCancel && /* @__PURE__ */ jsx(Button, { variant: "cancel", onClick: handleCancel, children: t(cancelText) }),
|
|
10152
|
+
confirmText && /* @__PURE__ */ jsx(Button, { variant: dialogButtonVariantMap[variant], onClick: handleConfirm, children: t(confirmText) })
|
|
10153
|
+
] })
|
|
10154
|
+
]
|
|
10155
|
+
}
|
|
10156
|
+
) });
|
|
10137
10157
|
}
|
|
10138
10158
|
|
|
10139
10159
|
// src/components/dialog-alert/templates/index.ts
|
|
@@ -11324,6 +11344,21 @@ __export(ui_exports, {
|
|
|
11324
11344
|
DialogFooter: () => DialogFooter,
|
|
11325
11345
|
DialogTitle: () => DialogTitle2,
|
|
11326
11346
|
DialogTrigger: () => DialogTrigger,
|
|
11347
|
+
DropdownMenu: () => DropdownMenu,
|
|
11348
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
11349
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
11350
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
11351
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
11352
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
11353
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
11354
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
11355
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
11356
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
11357
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
11358
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
11359
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
11360
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
11361
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
11327
11362
|
Form: () => Form,
|
|
11328
11363
|
FormControl: () => FormControl,
|
|
11329
11364
|
FormDescription: () => FormDescription,
|
|
@@ -11355,7 +11390,7 @@ __export(ui_exports, {
|
|
|
11355
11390
|
SelectSeparator: () => SelectSeparator,
|
|
11356
11391
|
SelectTrigger: () => SelectTrigger,
|
|
11357
11392
|
SelectValue: () => SelectValue,
|
|
11358
|
-
Separator: () =>
|
|
11393
|
+
Separator: () => Separator3,
|
|
11359
11394
|
Sheet: () => Sheet,
|
|
11360
11395
|
SheetClose: () => SheetClose,
|
|
11361
11396
|
SheetContent: () => SheetContent,
|
|
@@ -11435,6 +11470,208 @@ var ListContainer = ({ className, isLeftExpanded, children }) => {
|
|
|
11435
11470
|
);
|
|
11436
11471
|
};
|
|
11437
11472
|
var container_default = ListContainer;
|
|
11473
|
+
function DropdownMenu({ ...props }) {
|
|
11474
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
11475
|
+
}
|
|
11476
|
+
function DropdownMenuPortal({ ...props }) {
|
|
11477
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
11478
|
+
}
|
|
11479
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
11480
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
11481
|
+
}
|
|
11482
|
+
function DropdownMenuContent({
|
|
11483
|
+
className,
|
|
11484
|
+
align = "start",
|
|
11485
|
+
sideOffset = 4,
|
|
11486
|
+
...props
|
|
11487
|
+
}) {
|
|
11488
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
11489
|
+
DropdownMenuPrimitive.Content,
|
|
11490
|
+
{
|
|
11491
|
+
"data-slot": "dropdown-menu-content",
|
|
11492
|
+
sideOffset,
|
|
11493
|
+
align,
|
|
11494
|
+
className: cn(
|
|
11495
|
+
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-32 rounded-lg p-1 shadow-md ring-1 duration-100 z-50 max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto data-[state=closed]:overflow-hidden",
|
|
11496
|
+
className
|
|
11497
|
+
),
|
|
11498
|
+
...props
|
|
11499
|
+
}
|
|
11500
|
+
) });
|
|
11501
|
+
}
|
|
11502
|
+
function DropdownMenuGroup({ ...props }) {
|
|
11503
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
11504
|
+
}
|
|
11505
|
+
function DropdownMenuItem({
|
|
11506
|
+
className,
|
|
11507
|
+
inset,
|
|
11508
|
+
variant = "default",
|
|
11509
|
+
...props
|
|
11510
|
+
}) {
|
|
11511
|
+
return /* @__PURE__ */ jsx(
|
|
11512
|
+
DropdownMenuPrimitive.Item,
|
|
11513
|
+
{
|
|
11514
|
+
"data-slot": "dropdown-menu-item",
|
|
11515
|
+
"data-inset": inset,
|
|
11516
|
+
"data-variant": variant,
|
|
11517
|
+
className: cn(
|
|
11518
|
+
"data-highlighted:bg-[#EAF5EE] data-highlighted:text-[#379A2A] focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:text-destructive not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-3 py-2 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 group/dropdown-menu-item relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11519
|
+
className
|
|
11520
|
+
),
|
|
11521
|
+
...props
|
|
11522
|
+
}
|
|
11523
|
+
);
|
|
11524
|
+
}
|
|
11525
|
+
function DropdownMenuCheckboxItem({
|
|
11526
|
+
className,
|
|
11527
|
+
children,
|
|
11528
|
+
checked,
|
|
11529
|
+
inset,
|
|
11530
|
+
...props
|
|
11531
|
+
}) {
|
|
11532
|
+
return /* @__PURE__ */ jsxs(
|
|
11533
|
+
DropdownMenuPrimitive.CheckboxItem,
|
|
11534
|
+
{
|
|
11535
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
11536
|
+
"data-inset": inset,
|
|
11537
|
+
className: cn(
|
|
11538
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11539
|
+
className
|
|
11540
|
+
),
|
|
11541
|
+
checked,
|
|
11542
|
+
...props,
|
|
11543
|
+
children: [
|
|
11544
|
+
/* @__PURE__ */ jsx(
|
|
11545
|
+
"span",
|
|
11546
|
+
{
|
|
11547
|
+
className: "absolute right-2 flex items-center justify-center pointer-events-none",
|
|
11548
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
11549
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
11550
|
+
}
|
|
11551
|
+
),
|
|
11552
|
+
children
|
|
11553
|
+
]
|
|
11554
|
+
}
|
|
11555
|
+
);
|
|
11556
|
+
}
|
|
11557
|
+
function DropdownMenuRadioGroup({
|
|
11558
|
+
...props
|
|
11559
|
+
}) {
|
|
11560
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
11561
|
+
}
|
|
11562
|
+
function DropdownMenuRadioItem({
|
|
11563
|
+
className,
|
|
11564
|
+
children,
|
|
11565
|
+
inset,
|
|
11566
|
+
...props
|
|
11567
|
+
}) {
|
|
11568
|
+
return /* @__PURE__ */ jsxs(
|
|
11569
|
+
DropdownMenuPrimitive.RadioItem,
|
|
11570
|
+
{
|
|
11571
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
11572
|
+
"data-inset": inset,
|
|
11573
|
+
className: cn(
|
|
11574
|
+
"focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 relative flex cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11575
|
+
className
|
|
11576
|
+
),
|
|
11577
|
+
...props,
|
|
11578
|
+
children: [
|
|
11579
|
+
/* @__PURE__ */ jsx(
|
|
11580
|
+
"span",
|
|
11581
|
+
{
|
|
11582
|
+
className: "absolute right-2 flex items-center justify-center pointer-events-none",
|
|
11583
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
11584
|
+
children: /* @__PURE__ */ jsx(DropdownMenuPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
11585
|
+
}
|
|
11586
|
+
),
|
|
11587
|
+
children
|
|
11588
|
+
]
|
|
11589
|
+
}
|
|
11590
|
+
);
|
|
11591
|
+
}
|
|
11592
|
+
function DropdownMenuLabel({
|
|
11593
|
+
className,
|
|
11594
|
+
inset,
|
|
11595
|
+
...props
|
|
11596
|
+
}) {
|
|
11597
|
+
return /* @__PURE__ */ jsx(
|
|
11598
|
+
DropdownMenuPrimitive.Label,
|
|
11599
|
+
{
|
|
11600
|
+
"data-slot": "dropdown-menu-label",
|
|
11601
|
+
"data-inset": inset,
|
|
11602
|
+
className: cn("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7", className),
|
|
11603
|
+
...props
|
|
11604
|
+
}
|
|
11605
|
+
);
|
|
11606
|
+
}
|
|
11607
|
+
function DropdownMenuSeparator({
|
|
11608
|
+
className,
|
|
11609
|
+
...props
|
|
11610
|
+
}) {
|
|
11611
|
+
return /* @__PURE__ */ jsx(
|
|
11612
|
+
DropdownMenuPrimitive.Separator,
|
|
11613
|
+
{
|
|
11614
|
+
"data-slot": "dropdown-menu-separator",
|
|
11615
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
11616
|
+
...props
|
|
11617
|
+
}
|
|
11618
|
+
);
|
|
11619
|
+
}
|
|
11620
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
11621
|
+
return /* @__PURE__ */ jsx(
|
|
11622
|
+
"span",
|
|
11623
|
+
{
|
|
11624
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
11625
|
+
className: cn(
|
|
11626
|
+
"text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",
|
|
11627
|
+
className
|
|
11628
|
+
),
|
|
11629
|
+
...props
|
|
11630
|
+
}
|
|
11631
|
+
);
|
|
11632
|
+
}
|
|
11633
|
+
function DropdownMenuSub({ ...props }) {
|
|
11634
|
+
return /* @__PURE__ */ jsx(DropdownMenuPrimitive.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
11635
|
+
}
|
|
11636
|
+
function DropdownMenuSubTrigger({
|
|
11637
|
+
className,
|
|
11638
|
+
inset,
|
|
11639
|
+
children,
|
|
11640
|
+
...props
|
|
11641
|
+
}) {
|
|
11642
|
+
return /* @__PURE__ */ jsxs(
|
|
11643
|
+
DropdownMenuPrimitive.SubTrigger,
|
|
11644
|
+
{
|
|
11645
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
11646
|
+
"data-inset": inset,
|
|
11647
|
+
className: cn(
|
|
11648
|
+
"data-highlighted:bg-[#EAF5EE] data-highlighted:text-[#379A2A] focus:bg-accent focus:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md px-3 py-2 text-sm data-inset:pl-7 [&_svg:not([class*='size-'])]:size-4 flex cursor-default items-center outline-hidden select-none [&_svg]:pointer-events-none [&_svg]:shrink-0",
|
|
11649
|
+
className
|
|
11650
|
+
),
|
|
11651
|
+
...props,
|
|
11652
|
+
children: [
|
|
11653
|
+
children,
|
|
11654
|
+
/* @__PURE__ */ jsx(ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
11655
|
+
]
|
|
11656
|
+
}
|
|
11657
|
+
);
|
|
11658
|
+
}
|
|
11659
|
+
function DropdownMenuSubContent({
|
|
11660
|
+
className,
|
|
11661
|
+
...props
|
|
11662
|
+
}) {
|
|
11663
|
+
return /* @__PURE__ */ jsx(
|
|
11664
|
+
DropdownMenuPrimitive.SubContent,
|
|
11665
|
+
{
|
|
11666
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
11667
|
+
className: cn(
|
|
11668
|
+
"data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 bg-popover text-popover-foreground min-w-24 rounded-lg p-1 shadow-lg ring-1 duration-100 z-50 origin-(--radix-dropdown-menu-content-transform-origin) max-h-(--radix-dropdown-menu-content-available-height) w-(--radix-dropdown-menu-trigger-width) overflow-x-hidden overflow-y-auto data-[state=closed]:overflow-hidden",
|
|
11669
|
+
className
|
|
11670
|
+
),
|
|
11671
|
+
...props
|
|
11672
|
+
}
|
|
11673
|
+
);
|
|
11674
|
+
}
|
|
11438
11675
|
var ListHeader = ({
|
|
11439
11676
|
title,
|
|
11440
11677
|
titleIcon,
|
|
@@ -11530,7 +11767,7 @@ function RadioLabel({
|
|
|
11530
11767
|
}
|
|
11531
11768
|
);
|
|
11532
11769
|
}
|
|
11533
|
-
function
|
|
11770
|
+
function Separator3({
|
|
11534
11771
|
className,
|
|
11535
11772
|
orientation = "horizontal",
|
|
11536
11773
|
decorative = true,
|
|
@@ -11946,7 +12183,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
11946
12183
|
}
|
|
11947
12184
|
function SidebarSeparator({ className, ...props }) {
|
|
11948
12185
|
return /* @__PURE__ */ jsx(
|
|
11949
|
-
|
|
12186
|
+
Separator3,
|
|
11950
12187
|
{
|
|
11951
12188
|
"data-slot": "sidebar-separator",
|
|
11952
12189
|
"data-sidebar": "separator",
|
|
@@ -17173,6 +17410,111 @@ var ActionMenu = ({
|
|
|
17173
17410
|
)
|
|
17174
17411
|
] });
|
|
17175
17412
|
};
|
|
17413
|
+
var renderMenuItem = (item) => {
|
|
17414
|
+
if (item.subItems && item.subItems.length > 0) {
|
|
17415
|
+
return /* @__PURE__ */ jsxs(DropdownMenuSub, { children: [
|
|
17416
|
+
/* @__PURE__ */ jsxs(DropdownMenuSubTrigger, { disabled: item.disabled, children: [
|
|
17417
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17418
|
+
item.label
|
|
17419
|
+
] }),
|
|
17420
|
+
/* @__PURE__ */ jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsx(DropdownMenuSubContent, { children: item.subItems.map((subItem) => renderMenuItem(subItem)) }) })
|
|
17421
|
+
] }, item.label);
|
|
17422
|
+
}
|
|
17423
|
+
if (item.type === "checkbox") {
|
|
17424
|
+
return /* @__PURE__ */ jsxs(
|
|
17425
|
+
DropdownMenuCheckboxItem,
|
|
17426
|
+
{
|
|
17427
|
+
checked: item.checked,
|
|
17428
|
+
onCheckedChange: item.onCheckedChange,
|
|
17429
|
+
disabled: item.disabled,
|
|
17430
|
+
children: [
|
|
17431
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17432
|
+
item.label,
|
|
17433
|
+
item.shortcut && /* @__PURE__ */ jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17434
|
+
]
|
|
17435
|
+
},
|
|
17436
|
+
item.label
|
|
17437
|
+
);
|
|
17438
|
+
}
|
|
17439
|
+
if (item.type === "radio") {
|
|
17440
|
+
return /* @__PURE__ */ jsxs(DropdownMenuRadioItem, { value: item.value ?? item.label, disabled: item.disabled, children: [
|
|
17441
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17442
|
+
item.label,
|
|
17443
|
+
item.shortcut && /* @__PURE__ */ jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17444
|
+
] }, item.label);
|
|
17445
|
+
}
|
|
17446
|
+
return /* @__PURE__ */ jsxs(
|
|
17447
|
+
DropdownMenuItem,
|
|
17448
|
+
{
|
|
17449
|
+
onClick: item.onClick,
|
|
17450
|
+
disabled: item.disabled,
|
|
17451
|
+
variant: item.variant,
|
|
17452
|
+
children: [
|
|
17453
|
+
item.icon && /* @__PURE__ */ jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17454
|
+
item.label,
|
|
17455
|
+
item.shortcut && /* @__PURE__ */ jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17456
|
+
]
|
|
17457
|
+
},
|
|
17458
|
+
item.label
|
|
17459
|
+
);
|
|
17460
|
+
};
|
|
17461
|
+
var renderGroup = (group, index, total) => {
|
|
17462
|
+
const items = group.radioGroupValue !== void 0 ? /* @__PURE__ */ jsx(DropdownMenuRadioGroup, { value: group.radioGroupValue, onValueChange: group.onRadioValueChange, children: group.menuItems.map((item) => renderMenuItem(item)) }) : group.menuItems.map((item) => renderMenuItem(item));
|
|
17463
|
+
return /* @__PURE__ */ jsxs(React__default.Fragment, { children: [
|
|
17464
|
+
/* @__PURE__ */ jsxs(DropdownMenuGroup, { children: [
|
|
17465
|
+
group.groupLabel && /* @__PURE__ */ jsx(DropdownMenuLabel, { children: group.groupLabel }),
|
|
17466
|
+
items
|
|
17467
|
+
] }),
|
|
17468
|
+
index < total - 1 && /* @__PURE__ */ jsx(DropdownMenuSeparator, {})
|
|
17469
|
+
] }, `ddl-menu-group-${index}`);
|
|
17470
|
+
};
|
|
17471
|
+
var ActionDropdown = ({
|
|
17472
|
+
trigger,
|
|
17473
|
+
triggerLabel = "Manage Data",
|
|
17474
|
+
triggerAsChild = false,
|
|
17475
|
+
actionItems,
|
|
17476
|
+
align,
|
|
17477
|
+
side,
|
|
17478
|
+
sideOffset,
|
|
17479
|
+
className,
|
|
17480
|
+
contentClassName
|
|
17481
|
+
}) => {
|
|
17482
|
+
const defaultTrigger = /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
17483
|
+
/* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: triggerLabel }),
|
|
17484
|
+
/* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4 text-gray-300 shrink-0 pointer-events-none" })
|
|
17485
|
+
] });
|
|
17486
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
17487
|
+
/* @__PURE__ */ jsx(
|
|
17488
|
+
DropdownMenuTrigger,
|
|
17489
|
+
{
|
|
17490
|
+
asChild: triggerAsChild,
|
|
17491
|
+
className: cn(
|
|
17492
|
+
!triggerAsChild && [
|
|
17493
|
+
"border-input h-9 w-fit flex items-center justify-between gap-2",
|
|
17494
|
+
"rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap",
|
|
17495
|
+
"shadow-xs transition-[color,box-shadow] outline-none cursor-pointer",
|
|
17496
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
17497
|
+
"data-[state=open]:border-ring",
|
|
17498
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
17499
|
+
],
|
|
17500
|
+
className
|
|
17501
|
+
),
|
|
17502
|
+
children: trigger ?? defaultTrigger
|
|
17503
|
+
}
|
|
17504
|
+
),
|
|
17505
|
+
/* @__PURE__ */ jsx(
|
|
17506
|
+
DropdownMenuContent,
|
|
17507
|
+
{
|
|
17508
|
+
align,
|
|
17509
|
+
side,
|
|
17510
|
+
sideOffset,
|
|
17511
|
+
className: contentClassName,
|
|
17512
|
+
children: actionItems?.map((group, index) => renderGroup(group, index, actionItems.length))
|
|
17513
|
+
}
|
|
17514
|
+
)
|
|
17515
|
+
] });
|
|
17516
|
+
};
|
|
17517
|
+
var dropdownMenu_default = ActionDropdown;
|
|
17176
17518
|
var TruncatedMouseEnterDiv = ({
|
|
17177
17519
|
value,
|
|
17178
17520
|
className,
|
|
@@ -17283,7 +17625,7 @@ var TabSelect = ({
|
|
|
17283
17625
|
`${item}.${index}`
|
|
17284
17626
|
),
|
|
17285
17627
|
/* @__PURE__ */ jsx(
|
|
17286
|
-
|
|
17628
|
+
Separator3,
|
|
17287
17629
|
{
|
|
17288
17630
|
hidden: index >= items.length - 1,
|
|
17289
17631
|
orientation: "vertical",
|
|
@@ -18052,6 +18394,6 @@ function InputMentionInner({
|
|
|
18052
18394
|
}
|
|
18053
18395
|
var InputMention = forwardRef(InputMentionInner);
|
|
18054
18396
|
|
|
18055
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogTitle2 as DialogTitle, DialogTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue,
|
|
18397
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, dropdownMenu_default as ActionDropdown, ActionMenu, AdministrationIcon, AdvanceSearch_default as AdvanceSearch, AnalyticsIcon, ApplicationLogIcon, ArrowIcon, AuditFooter, BookmarkIcon, BriefcaseBusinessIcon, BuildingIcon, Button, SuiCalendarIcon2 as Calendar2Icon, CalendarDaysIcon, CardIcon, Carousel, CarouselContent, CarouselDots, CarouselItem, CarouselNext, CarouselPrevious, CarouselThumbnails, Checkbox, CircleUserIcon, Collapsible, CollapsibleContent2 as CollapsibleContent, CollapsibleTrigger2 as CollapsibleTrigger, Combobox_default as Combobox, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyUserRightsIcon, CropperModal, CropperModalError, CustomActionStatusIcon, CustomFieldIcon, DIALOG_ALERT_I18N_SUBNAMESPACE, DIALOG_ALERT_TEMPLATES, DashboardIcon, DataEntryIcon, DataTable_default as DataTable, DatePicker2 as DatePicker, DecreaseIcon, Dialog2 as Dialog, DialogAlert, DialogAlertProvider, DialogContent2 as DialogContent, DialogDescription2 as DialogDescription, DialogFooter, DialogTitle2 as DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EllipsisBoxIcon, ErrorCompression, ErrorCreateCanvas, ErrorGeneratingBlob, ErrorInvalidSVG, ErrorSVGExceedSize, FactoryIcon, FileCogIcon, FileSpreadsheet, FileTextIcon, FiltersIcon, FolderIcon, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FormulaEditor, GridSettingsModal_default as GridSettingsModal, HamburgerMenuIcon, HandymanIcon, header_default as Header, HeaderCell_default as HeaderCell, HelpIcon, HomeIcon, HomePlusIcon, Image2 as Image, ImagePlaceholderIcon, InformationIcon, Input, InputMention, InputNumber_default as InputNumber, Label2 as Label, LoadingPage, LookupSelect, MailIcon, MainListContainer_default as MainListContainer, ManIcon, ManagementIcon, MenuIcon, MessageIcon, MessageIconInverse, MessageSquareIcon, MonthPicker2 as MonthPicker, navbar_default as Navbar, NotFoundIcon, OutlineArrowIcon, PlusIcon, PlusSearchIcon, Popover, PopoverAnchor, PopoverArrow, PopoverContent, PopoverTrigger, PowerIcon, PreventPageLeave_default as PreventPageLeave, QuestionIcon, RadioGroupItem, RadioGroupRoot, RadioLabel, RichText, RightPanelContainer_default as RightPanelContainer, RoleIcon, SearchIcon, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator3 as Separator, SetupIcon, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarLayout, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, Skeleton, Spinner, SuiCalendarIcon, SuiCalendarIcon2, SuiCheckIcon, SuiDotsVerticalIcon, SuiEmptyDataIcon, SuiExpandIcon, SuiFilterIcon, SuiSettingIcon, SuiTriangleDownIcon, SuiWarningIcon, Switch, TabSelect, Table, TableBody, TableCaption, TableCell, TableContainer, TableFooter, TableHead, TableHeader, TableOfContents, TableRow, TagListViewIcon, TextArea, TimePicker, ToolBoxIcon, Tooltip2 as Tooltip, TooltipArrow, TooltipContent2 as TooltipContent, TooltipProvider2 as TooltipProvider, TooltipTrigger2 as TooltipTrigger, TransferUserRightsIcon, TrashIcon, truncated_default as Truncated, truncatedMouseEnterDiv_default as TruncatedMouseEnterDiv, ui_exports as UI, UserActiveIcon, UserAloneIcon, UserFriendIcon, UserGroupIcon, UserIcon, UserInactiveIcon, UserNameIcon, UserProtectIcon, UsersIcon, VirtualizedCommand_default as VirtualizedCommand, WorkFlowIcon, booleanToSelectValue, buildPrefixMap, buttonVariants, cn, compareAlphanumeric, debounce, defaultOperatorShortcuts, defaultOperators, formatISODate, getDialogAlertControls, inputVariants, isDefined, isEmptyObject, isValidParentheses, mapTokensToOutput, parseFormula, parseFormulaToToken, resetVisibleTableState, selectValueToBoolean, spinnerVariants, splitOperators, stripNullishObject, throttle, tokenizeFormulaString, useBindRef_default as useBindRef, useCarousel, useControllableState_default as useControllableState, useDraftGuardStore, useFormField, useGridSettingsStore_default as useGridSettingsStore, useHover_default as useHover, useIntersectionObserver_default as useIntersectionObserver, useIsomorphicLayoutEffect, useMediaQuery_default as useMediaQuery, usePreventPageLeave_default as usePreventPageLeave, usePreventPageLeaveStore_default as usePreventPageLeaveStore, useSafeBlocker, useScreenSize_default as useScreenSize, useSidebar, useTruncated_default as useTruncated, validateTokenPrefixes };
|
|
18056
18398
|
//# sourceMappingURL=index.mjs.map
|
|
18057
18399
|
//# sourceMappingURL=index.mjs.map
|