@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.js
CHANGED
|
@@ -33,6 +33,7 @@ var ReactDOM = require('react-dom/client');
|
|
|
33
33
|
var core = require('@tiptap/core');
|
|
34
34
|
var Suggestion = require('@tiptap/suggestion');
|
|
35
35
|
var prosemirrorState = require('prosemirror-state');
|
|
36
|
+
var DropdownMenuPrimitive = require('@radix-ui/react-dropdown-menu');
|
|
36
37
|
var RadioGroupPrimitive = require('@radix-ui/react-radio-group');
|
|
37
38
|
var SeparatorPrimitive = require('@radix-ui/react-separator');
|
|
38
39
|
var SwitchPrimitive = require('@radix-ui/react-switch');
|
|
@@ -103,6 +104,7 @@ var i18n__default = /*#__PURE__*/_interopDefault(i18n);
|
|
|
103
104
|
var StarterKit__default = /*#__PURE__*/_interopDefault(StarterKit);
|
|
104
105
|
var ReactDOM__default = /*#__PURE__*/_interopDefault(ReactDOM);
|
|
105
106
|
var Suggestion__default = /*#__PURE__*/_interopDefault(Suggestion);
|
|
107
|
+
var DropdownMenuPrimitive__namespace = /*#__PURE__*/_interopNamespace(DropdownMenuPrimitive);
|
|
106
108
|
var RadioGroupPrimitive__namespace = /*#__PURE__*/_interopNamespace(RadioGroupPrimitive);
|
|
107
109
|
var SeparatorPrimitive__namespace = /*#__PURE__*/_interopNamespace(SeparatorPrimitive);
|
|
108
110
|
var SwitchPrimitive__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitive);
|
|
@@ -10164,18 +10166,37 @@ function DialogAlert({
|
|
|
10164
10166
|
func?.();
|
|
10165
10167
|
onOpenChange(false);
|
|
10166
10168
|
}, [onCancel, onConfirm, onOpenChange, showCancel, variant]);
|
|
10169
|
+
const handleOpenChange = React.useCallback(
|
|
10170
|
+
(state) => {
|
|
10171
|
+
if (!state) {
|
|
10172
|
+
onCancel?.();
|
|
10173
|
+
}
|
|
10174
|
+
onOpenChange(state);
|
|
10175
|
+
},
|
|
10176
|
+
[onCancel, onOpenChange]
|
|
10177
|
+
);
|
|
10167
10178
|
return /* @__PURE__ */ jsxRuntime.jsx(Dialog3, { open, onOpenChange: persistent ? () => {
|
|
10168
|
-
} :
|
|
10169
|
-
|
|
10170
|
-
|
|
10171
|
-
|
|
10172
|
-
|
|
10173
|
-
|
|
10174
|
-
|
|
10175
|
-
|
|
10176
|
-
|
|
10177
|
-
|
|
10178
|
-
|
|
10179
|
+
} : handleOpenChange, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10180
|
+
DialogContent3,
|
|
10181
|
+
{
|
|
10182
|
+
className: "max-w-md",
|
|
10183
|
+
showCloseButton: !persistent,
|
|
10184
|
+
onInteractOutside: (e) => {
|
|
10185
|
+
e.preventDefault();
|
|
10186
|
+
},
|
|
10187
|
+
children: [
|
|
10188
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DialogHeader3, { children: [
|
|
10189
|
+
title && /* @__PURE__ */ jsxRuntime.jsx(DialogTitle3, { className: titleColorVariant[variant], children: t(title) }),
|
|
10190
|
+
description && /* @__PURE__ */ jsxRuntime.jsx(DialogDescription3, { children: t(description) })
|
|
10191
|
+
] }),
|
|
10192
|
+
outlet && outlet,
|
|
10193
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: `flex gap-2 ${alignClass}`, children: [
|
|
10194
|
+
showCancel && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: "cancel", onClick: handleCancel, children: t(cancelText) }),
|
|
10195
|
+
confirmText && /* @__PURE__ */ jsxRuntime.jsx(Button, { variant: dialogButtonVariantMap[variant], onClick: handleConfirm, children: t(confirmText) })
|
|
10196
|
+
] })
|
|
10197
|
+
]
|
|
10198
|
+
}
|
|
10199
|
+
) });
|
|
10179
10200
|
}
|
|
10180
10201
|
|
|
10181
10202
|
// src/components/dialog-alert/templates/index.ts
|
|
@@ -11366,6 +11387,21 @@ __export(ui_exports, {
|
|
|
11366
11387
|
DialogFooter: () => DialogFooter,
|
|
11367
11388
|
DialogTitle: () => DialogTitle2,
|
|
11368
11389
|
DialogTrigger: () => DialogTrigger,
|
|
11390
|
+
DropdownMenu: () => DropdownMenu,
|
|
11391
|
+
DropdownMenuCheckboxItem: () => DropdownMenuCheckboxItem,
|
|
11392
|
+
DropdownMenuContent: () => DropdownMenuContent,
|
|
11393
|
+
DropdownMenuGroup: () => DropdownMenuGroup,
|
|
11394
|
+
DropdownMenuItem: () => DropdownMenuItem,
|
|
11395
|
+
DropdownMenuLabel: () => DropdownMenuLabel,
|
|
11396
|
+
DropdownMenuPortal: () => DropdownMenuPortal,
|
|
11397
|
+
DropdownMenuRadioGroup: () => DropdownMenuRadioGroup,
|
|
11398
|
+
DropdownMenuRadioItem: () => DropdownMenuRadioItem,
|
|
11399
|
+
DropdownMenuSeparator: () => DropdownMenuSeparator,
|
|
11400
|
+
DropdownMenuShortcut: () => DropdownMenuShortcut,
|
|
11401
|
+
DropdownMenuSub: () => DropdownMenuSub,
|
|
11402
|
+
DropdownMenuSubContent: () => DropdownMenuSubContent,
|
|
11403
|
+
DropdownMenuSubTrigger: () => DropdownMenuSubTrigger,
|
|
11404
|
+
DropdownMenuTrigger: () => DropdownMenuTrigger,
|
|
11369
11405
|
Form: () => Form,
|
|
11370
11406
|
FormControl: () => FormControl,
|
|
11371
11407
|
FormDescription: () => FormDescription,
|
|
@@ -11397,7 +11433,7 @@ __export(ui_exports, {
|
|
|
11397
11433
|
SelectSeparator: () => SelectSeparator,
|
|
11398
11434
|
SelectTrigger: () => SelectTrigger,
|
|
11399
11435
|
SelectValue: () => SelectValue,
|
|
11400
|
-
Separator: () =>
|
|
11436
|
+
Separator: () => Separator3,
|
|
11401
11437
|
Sheet: () => Sheet,
|
|
11402
11438
|
SheetClose: () => SheetClose,
|
|
11403
11439
|
SheetContent: () => SheetContent,
|
|
@@ -11477,6 +11513,208 @@ var ListContainer = ({ className, isLeftExpanded, children }) => {
|
|
|
11477
11513
|
);
|
|
11478
11514
|
};
|
|
11479
11515
|
var container_default = ListContainer;
|
|
11516
|
+
function DropdownMenu({ ...props }) {
|
|
11517
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Root, { "data-slot": "dropdown-menu", ...props });
|
|
11518
|
+
}
|
|
11519
|
+
function DropdownMenuPortal({ ...props }) {
|
|
11520
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
11521
|
+
}
|
|
11522
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
11523
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
11524
|
+
}
|
|
11525
|
+
function DropdownMenuContent({
|
|
11526
|
+
className,
|
|
11527
|
+
align = "start",
|
|
11528
|
+
sideOffset = 4,
|
|
11529
|
+
...props
|
|
11530
|
+
}) {
|
|
11531
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
11532
|
+
DropdownMenuPrimitive__namespace.Content,
|
|
11533
|
+
{
|
|
11534
|
+
"data-slot": "dropdown-menu-content",
|
|
11535
|
+
sideOffset,
|
|
11536
|
+
align,
|
|
11537
|
+
className: cn(
|
|
11538
|
+
"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",
|
|
11539
|
+
className
|
|
11540
|
+
),
|
|
11541
|
+
...props
|
|
11542
|
+
}
|
|
11543
|
+
) });
|
|
11544
|
+
}
|
|
11545
|
+
function DropdownMenuGroup({ ...props }) {
|
|
11546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
11547
|
+
}
|
|
11548
|
+
function DropdownMenuItem({
|
|
11549
|
+
className,
|
|
11550
|
+
inset,
|
|
11551
|
+
variant = "default",
|
|
11552
|
+
...props
|
|
11553
|
+
}) {
|
|
11554
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11555
|
+
DropdownMenuPrimitive__namespace.Item,
|
|
11556
|
+
{
|
|
11557
|
+
"data-slot": "dropdown-menu-item",
|
|
11558
|
+
"data-inset": inset,
|
|
11559
|
+
"data-variant": variant,
|
|
11560
|
+
className: cn(
|
|
11561
|
+
"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",
|
|
11562
|
+
className
|
|
11563
|
+
),
|
|
11564
|
+
...props
|
|
11565
|
+
}
|
|
11566
|
+
);
|
|
11567
|
+
}
|
|
11568
|
+
function DropdownMenuCheckboxItem({
|
|
11569
|
+
className,
|
|
11570
|
+
children,
|
|
11571
|
+
checked,
|
|
11572
|
+
inset,
|
|
11573
|
+
...props
|
|
11574
|
+
}) {
|
|
11575
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11576
|
+
DropdownMenuPrimitive__namespace.CheckboxItem,
|
|
11577
|
+
{
|
|
11578
|
+
"data-slot": "dropdown-menu-checkbox-item",
|
|
11579
|
+
"data-inset": inset,
|
|
11580
|
+
className: cn(
|
|
11581
|
+
"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",
|
|
11582
|
+
className
|
|
11583
|
+
),
|
|
11584
|
+
checked,
|
|
11585
|
+
...props,
|
|
11586
|
+
children: [
|
|
11587
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11588
|
+
"span",
|
|
11589
|
+
{
|
|
11590
|
+
className: "absolute right-2 flex items-center justify-center pointer-events-none",
|
|
11591
|
+
"data-slot": "dropdown-menu-checkbox-item-indicator",
|
|
11592
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) })
|
|
11593
|
+
}
|
|
11594
|
+
),
|
|
11595
|
+
children
|
|
11596
|
+
]
|
|
11597
|
+
}
|
|
11598
|
+
);
|
|
11599
|
+
}
|
|
11600
|
+
function DropdownMenuRadioGroup({
|
|
11601
|
+
...props
|
|
11602
|
+
}) {
|
|
11603
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props });
|
|
11604
|
+
}
|
|
11605
|
+
function DropdownMenuRadioItem({
|
|
11606
|
+
className,
|
|
11607
|
+
children,
|
|
11608
|
+
inset,
|
|
11609
|
+
...props
|
|
11610
|
+
}) {
|
|
11611
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11612
|
+
DropdownMenuPrimitive__namespace.RadioItem,
|
|
11613
|
+
{
|
|
11614
|
+
"data-slot": "dropdown-menu-radio-item",
|
|
11615
|
+
"data-inset": inset,
|
|
11616
|
+
className: cn(
|
|
11617
|
+
"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",
|
|
11618
|
+
className
|
|
11619
|
+
),
|
|
11620
|
+
...props,
|
|
11621
|
+
children: [
|
|
11622
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11623
|
+
"span",
|
|
11624
|
+
{
|
|
11625
|
+
className: "absolute right-2 flex items-center justify-center pointer-events-none",
|
|
11626
|
+
"data-slot": "dropdown-menu-radio-item-indicator",
|
|
11627
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.ItemIndicator, { children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckIcon, {}) })
|
|
11628
|
+
}
|
|
11629
|
+
),
|
|
11630
|
+
children
|
|
11631
|
+
]
|
|
11632
|
+
}
|
|
11633
|
+
);
|
|
11634
|
+
}
|
|
11635
|
+
function DropdownMenuLabel({
|
|
11636
|
+
className,
|
|
11637
|
+
inset,
|
|
11638
|
+
...props
|
|
11639
|
+
}) {
|
|
11640
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11641
|
+
DropdownMenuPrimitive__namespace.Label,
|
|
11642
|
+
{
|
|
11643
|
+
"data-slot": "dropdown-menu-label",
|
|
11644
|
+
"data-inset": inset,
|
|
11645
|
+
className: cn("text-muted-foreground px-1.5 py-1 text-xs font-medium data-inset:pl-7", className),
|
|
11646
|
+
...props
|
|
11647
|
+
}
|
|
11648
|
+
);
|
|
11649
|
+
}
|
|
11650
|
+
function DropdownMenuSeparator({
|
|
11651
|
+
className,
|
|
11652
|
+
...props
|
|
11653
|
+
}) {
|
|
11654
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11655
|
+
DropdownMenuPrimitive__namespace.Separator,
|
|
11656
|
+
{
|
|
11657
|
+
"data-slot": "dropdown-menu-separator",
|
|
11658
|
+
className: cn("bg-border -mx-1 my-1 h-px", className),
|
|
11659
|
+
...props
|
|
11660
|
+
}
|
|
11661
|
+
);
|
|
11662
|
+
}
|
|
11663
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
11664
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11665
|
+
"span",
|
|
11666
|
+
{
|
|
11667
|
+
"data-slot": "dropdown-menu-shortcut",
|
|
11668
|
+
className: cn(
|
|
11669
|
+
"text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground ml-auto text-xs tracking-widest",
|
|
11670
|
+
className
|
|
11671
|
+
),
|
|
11672
|
+
...props
|
|
11673
|
+
}
|
|
11674
|
+
);
|
|
11675
|
+
}
|
|
11676
|
+
function DropdownMenuSub({ ...props }) {
|
|
11677
|
+
return /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPrimitive__namespace.Sub, { "data-slot": "dropdown-menu-sub", ...props });
|
|
11678
|
+
}
|
|
11679
|
+
function DropdownMenuSubTrigger({
|
|
11680
|
+
className,
|
|
11681
|
+
inset,
|
|
11682
|
+
children,
|
|
11683
|
+
...props
|
|
11684
|
+
}) {
|
|
11685
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11686
|
+
DropdownMenuPrimitive__namespace.SubTrigger,
|
|
11687
|
+
{
|
|
11688
|
+
"data-slot": "dropdown-menu-sub-trigger",
|
|
11689
|
+
"data-inset": inset,
|
|
11690
|
+
className: cn(
|
|
11691
|
+
"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",
|
|
11692
|
+
className
|
|
11693
|
+
),
|
|
11694
|
+
...props,
|
|
11695
|
+
children: [
|
|
11696
|
+
children,
|
|
11697
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRightIcon, { className: "cn-rtl-flip ml-auto" })
|
|
11698
|
+
]
|
|
11699
|
+
}
|
|
11700
|
+
);
|
|
11701
|
+
}
|
|
11702
|
+
function DropdownMenuSubContent({
|
|
11703
|
+
className,
|
|
11704
|
+
...props
|
|
11705
|
+
}) {
|
|
11706
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11707
|
+
DropdownMenuPrimitive__namespace.SubContent,
|
|
11708
|
+
{
|
|
11709
|
+
"data-slot": "dropdown-menu-sub-content",
|
|
11710
|
+
className: cn(
|
|
11711
|
+
"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",
|
|
11712
|
+
className
|
|
11713
|
+
),
|
|
11714
|
+
...props
|
|
11715
|
+
}
|
|
11716
|
+
);
|
|
11717
|
+
}
|
|
11480
11718
|
var ListHeader = ({
|
|
11481
11719
|
title,
|
|
11482
11720
|
titleIcon,
|
|
@@ -11572,7 +11810,7 @@ function RadioLabel({
|
|
|
11572
11810
|
}
|
|
11573
11811
|
);
|
|
11574
11812
|
}
|
|
11575
|
-
function
|
|
11813
|
+
function Separator3({
|
|
11576
11814
|
className,
|
|
11577
11815
|
orientation = "horizontal",
|
|
11578
11816
|
decorative = true,
|
|
@@ -11988,7 +12226,7 @@ function SidebarFooter({ className, ...props }) {
|
|
|
11988
12226
|
}
|
|
11989
12227
|
function SidebarSeparator({ className, ...props }) {
|
|
11990
12228
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
11991
|
-
|
|
12229
|
+
Separator3,
|
|
11992
12230
|
{
|
|
11993
12231
|
"data-slot": "sidebar-separator",
|
|
11994
12232
|
"data-sidebar": "separator",
|
|
@@ -17215,6 +17453,111 @@ var ActionMenu = ({
|
|
|
17215
17453
|
)
|
|
17216
17454
|
] });
|
|
17217
17455
|
};
|
|
17456
|
+
var renderMenuItem = (item) => {
|
|
17457
|
+
if (item.subItems && item.subItems.length > 0) {
|
|
17458
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSub, { children: [
|
|
17459
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuSubTrigger, { disabled: item.disabled, children: [
|
|
17460
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17461
|
+
item.label
|
|
17462
|
+
] }),
|
|
17463
|
+
/* @__PURE__ */ jsxRuntime.jsx(DropdownMenuPortal, { children: /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSubContent, { children: item.subItems.map((subItem) => renderMenuItem(subItem)) }) })
|
|
17464
|
+
] }, item.label);
|
|
17465
|
+
}
|
|
17466
|
+
if (item.type === "checkbox") {
|
|
17467
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17468
|
+
DropdownMenuCheckboxItem,
|
|
17469
|
+
{
|
|
17470
|
+
checked: item.checked,
|
|
17471
|
+
onCheckedChange: item.onCheckedChange,
|
|
17472
|
+
disabled: item.disabled,
|
|
17473
|
+
children: [
|
|
17474
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17475
|
+
item.label,
|
|
17476
|
+
item.shortcut && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17477
|
+
]
|
|
17478
|
+
},
|
|
17479
|
+
item.label
|
|
17480
|
+
);
|
|
17481
|
+
}
|
|
17482
|
+
if (item.type === "radio") {
|
|
17483
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuRadioItem, { value: item.value ?? item.label, disabled: item.disabled, children: [
|
|
17484
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17485
|
+
item.label,
|
|
17486
|
+
item.shortcut && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17487
|
+
] }, item.label);
|
|
17488
|
+
}
|
|
17489
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
17490
|
+
DropdownMenuItem,
|
|
17491
|
+
{
|
|
17492
|
+
onClick: item.onClick,
|
|
17493
|
+
disabled: item.disabled,
|
|
17494
|
+
variant: item.variant,
|
|
17495
|
+
children: [
|
|
17496
|
+
item.icon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "mr-2 shrink-0", children: item.icon }),
|
|
17497
|
+
item.label,
|
|
17498
|
+
item.shortcut && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuShortcut, { children: item.shortcut })
|
|
17499
|
+
]
|
|
17500
|
+
},
|
|
17501
|
+
item.label
|
|
17502
|
+
);
|
|
17503
|
+
};
|
|
17504
|
+
var renderGroup = (group, index, total) => {
|
|
17505
|
+
const items = group.radioGroupValue !== void 0 ? /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuRadioGroup, { value: group.radioGroupValue, onValueChange: group.onRadioValueChange, children: group.menuItems.map((item) => renderMenuItem(item)) }) : group.menuItems.map((item) => renderMenuItem(item));
|
|
17506
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(React__namespace.default.Fragment, { children: [
|
|
17507
|
+
/* @__PURE__ */ jsxRuntime.jsxs(DropdownMenuGroup, { children: [
|
|
17508
|
+
group.groupLabel && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuLabel, { children: group.groupLabel }),
|
|
17509
|
+
items
|
|
17510
|
+
] }),
|
|
17511
|
+
index < total - 1 && /* @__PURE__ */ jsxRuntime.jsx(DropdownMenuSeparator, {})
|
|
17512
|
+
] }, `ddl-menu-group-${index}`);
|
|
17513
|
+
};
|
|
17514
|
+
var ActionDropdown = ({
|
|
17515
|
+
trigger,
|
|
17516
|
+
triggerLabel = "Manage Data",
|
|
17517
|
+
triggerAsChild = false,
|
|
17518
|
+
actionItems,
|
|
17519
|
+
align,
|
|
17520
|
+
side,
|
|
17521
|
+
sideOffset,
|
|
17522
|
+
className,
|
|
17523
|
+
contentClassName
|
|
17524
|
+
}) => {
|
|
17525
|
+
const defaultTrigger = /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
17526
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: triggerLabel }),
|
|
17527
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronDown, { className: "h-4 w-4 text-gray-300 shrink-0 pointer-events-none" })
|
|
17528
|
+
] });
|
|
17529
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(DropdownMenu, { children: [
|
|
17530
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17531
|
+
DropdownMenuTrigger,
|
|
17532
|
+
{
|
|
17533
|
+
asChild: triggerAsChild,
|
|
17534
|
+
className: cn(
|
|
17535
|
+
!triggerAsChild && [
|
|
17536
|
+
"border-input h-9 w-fit flex items-center justify-between gap-2",
|
|
17537
|
+
"rounded-md border bg-transparent px-3 py-2 text-sm whitespace-nowrap",
|
|
17538
|
+
"shadow-xs transition-[color,box-shadow] outline-none cursor-pointer",
|
|
17539
|
+
"focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px]",
|
|
17540
|
+
"data-[state=open]:border-ring",
|
|
17541
|
+
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
17542
|
+
],
|
|
17543
|
+
className
|
|
17544
|
+
),
|
|
17545
|
+
children: trigger ?? defaultTrigger
|
|
17546
|
+
}
|
|
17547
|
+
),
|
|
17548
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17549
|
+
DropdownMenuContent,
|
|
17550
|
+
{
|
|
17551
|
+
align,
|
|
17552
|
+
side,
|
|
17553
|
+
sideOffset,
|
|
17554
|
+
className: contentClassName,
|
|
17555
|
+
children: actionItems?.map((group, index) => renderGroup(group, index, actionItems.length))
|
|
17556
|
+
}
|
|
17557
|
+
)
|
|
17558
|
+
] });
|
|
17559
|
+
};
|
|
17560
|
+
var dropdownMenu_default = ActionDropdown;
|
|
17218
17561
|
var TruncatedMouseEnterDiv = ({
|
|
17219
17562
|
value,
|
|
17220
17563
|
className,
|
|
@@ -17325,7 +17668,7 @@ var TabSelect = ({
|
|
|
17325
17668
|
`${item}.${index}`
|
|
17326
17669
|
),
|
|
17327
17670
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
17328
|
-
|
|
17671
|
+
Separator3,
|
|
17329
17672
|
{
|
|
17330
17673
|
hidden: index >= items.length - 1,
|
|
17331
17674
|
orientation: "vertical",
|
|
@@ -18098,6 +18441,7 @@ exports.Accordion = Accordion;
|
|
|
18098
18441
|
exports.AccordionContent = AccordionContent;
|
|
18099
18442
|
exports.AccordionItem = AccordionItem;
|
|
18100
18443
|
exports.AccordionTrigger = AccordionTrigger;
|
|
18444
|
+
exports.ActionDropdown = dropdownMenu_default;
|
|
18101
18445
|
exports.ActionMenu = ActionMenu;
|
|
18102
18446
|
exports.AdministrationIcon = AdministrationIcon;
|
|
18103
18447
|
exports.AdvanceSearch = AdvanceSearch_default;
|
|
@@ -18154,6 +18498,21 @@ exports.DialogDescription = DialogDescription2;
|
|
|
18154
18498
|
exports.DialogFooter = DialogFooter;
|
|
18155
18499
|
exports.DialogTitle = DialogTitle2;
|
|
18156
18500
|
exports.DialogTrigger = DialogTrigger;
|
|
18501
|
+
exports.DropdownMenu = DropdownMenu;
|
|
18502
|
+
exports.DropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
18503
|
+
exports.DropdownMenuContent = DropdownMenuContent;
|
|
18504
|
+
exports.DropdownMenuGroup = DropdownMenuGroup;
|
|
18505
|
+
exports.DropdownMenuItem = DropdownMenuItem;
|
|
18506
|
+
exports.DropdownMenuLabel = DropdownMenuLabel;
|
|
18507
|
+
exports.DropdownMenuPortal = DropdownMenuPortal;
|
|
18508
|
+
exports.DropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
18509
|
+
exports.DropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
18510
|
+
exports.DropdownMenuSeparator = DropdownMenuSeparator;
|
|
18511
|
+
exports.DropdownMenuShortcut = DropdownMenuShortcut;
|
|
18512
|
+
exports.DropdownMenuSub = DropdownMenuSub;
|
|
18513
|
+
exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
18514
|
+
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
18515
|
+
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
18157
18516
|
exports.EllipsisBoxIcon = EllipsisBoxIcon;
|
|
18158
18517
|
exports.ErrorCompression = ErrorCompression;
|
|
18159
18518
|
exports.ErrorCreateCanvas = ErrorCreateCanvas;
|
|
@@ -18230,7 +18589,7 @@ exports.SelectScrollUpButton = SelectScrollUpButton;
|
|
|
18230
18589
|
exports.SelectSeparator = SelectSeparator;
|
|
18231
18590
|
exports.SelectTrigger = SelectTrigger;
|
|
18232
18591
|
exports.SelectValue = SelectValue;
|
|
18233
|
-
exports.Separator =
|
|
18592
|
+
exports.Separator = Separator3;
|
|
18234
18593
|
exports.SetupIcon = SetupIcon;
|
|
18235
18594
|
exports.Sheet = Sheet;
|
|
18236
18595
|
exports.SheetClose = SheetClose;
|