@dynamic-labs-sdk/droplet 0.27.1 → 0.27.2
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/components/toggle-card/index.d.ts +2 -0
- package/dist/components/toggle-card/index.d.ts.map +1 -0
- package/dist/components/toggle-card/toggle-card.d.ts +113 -0
- package/dist/components/toggle-card/toggle-card.d.ts.map +1 -0
- package/dist/components/toggle-card/toggle-card.stories.d.ts +45 -0
- package/dist/components/toggle-card/toggle-card.stories.d.ts.map +1 -0
- package/dist/index.cjs +184 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +214 -30
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export { AskAIAction, WebhooksAction } from './components/page-actions';
|
|
|
48
48
|
export { ProductPageLayout } from './components/product-page-layout';
|
|
49
49
|
export { SettingsSection } from './components/settings-section';
|
|
50
50
|
export { StatusBadge } from './components/status-badge';
|
|
51
|
+
export { ToggleCard, type ToggleCardActionLink, type ToggleCardCustomActionIcon, type ToggleCardInputProps, type ToggleCardProps, type ToggleCardTag, } from './components/toggle-card';
|
|
51
52
|
export { ToggleRow } from './components/toggle-row';
|
|
52
53
|
export { UnsavedChangesBar } from './components/unsaved-changes-bar';
|
|
53
54
|
export { AnimatedIcon } from './components/icons/animated-icon';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,EAAE,EAAE,MAAM,aAAa,CAAC;AAGjC,OAAO,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAC;AAGrE,OAAO,EACL,SAAS,EACT,gBAAgB,EAChB,aAAa,EACb,gBAAgB,GACjB,MAAM,2BAA2B,CAAC;AACnC,OAA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MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,OAAO,EAAE,MAAM,wBAAwB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,OAAO,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC"}
|
package/dist/index.esm.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as Button, i as Input, n as Switch, o as buttonVariants, r as Label, s as cn, t as ToggleRow } from "./toggle-row-B5iXNWCJ.esm.js";
|
|
2
|
-
import { createContext, forwardRef, useCallback, useContext, useEffect, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
2
|
+
import { createContext, forwardRef, useCallback, useContext, useEffect, useId, useImperativeHandle, useMemo, useRef, useState } from "react";
|
|
3
3
|
import { AnimatePresence, motion, useAnimation, useReducedMotion } from "motion/react";
|
|
4
4
|
import { HugeiconsIcon } from "@hugeicons/react";
|
|
5
5
|
import { Add01Icon, Alert01Icon, ArrowDown01Icon, ArrowRight01Icon, ArrowUp01Icon, Cancel01Icon, CheckmarkCircle02Icon, Copy01Icon, InformationCircleIcon, Search01Icon, Tick01Icon, WebhookIcon } from "@hugeicons/core-free-icons";
|
|
@@ -7,24 +7,25 @@ import { cva } from "class-variance-authority";
|
|
|
7
7
|
import { Slot } from "@radix-ui/react-slot";
|
|
8
8
|
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
9
9
|
import * as AccordionPrimitive from "@radix-ui/react-accordion";
|
|
10
|
-
import {
|
|
10
|
+
import { Content, Header, Item, Root, Trigger } from "@radix-ui/react-accordion";
|
|
11
|
+
import { Action, Cancel, Content as Content$1, Description, Overlay, Portal, Root as Root$1, Title, Trigger as Trigger$1 } from "@radix-ui/react-alert-dialog";
|
|
11
12
|
import * as AvatarPrimitive from "@radix-ui/react-avatar";
|
|
12
13
|
import * as CheckboxPrimitive from "@radix-ui/react-checkbox";
|
|
13
14
|
import * as CollapsiblePrimitive from "@radix-ui/react-collapsible";
|
|
14
15
|
import { Command as Command$1 } from "cmdk";
|
|
15
16
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
16
|
-
import { Close, Content as Content$
|
|
17
|
-
import { CheckboxItem, Content as Content$
|
|
17
|
+
import { Close, Content as Content$2, Description as Description$1, Overlay as Overlay$1, Portal as Portal$1, Root as Root$2, Title as Title$1, Trigger as Trigger$2 } from "@radix-ui/react-dialog";
|
|
18
|
+
import { CheckboxItem, Content as Content$3, Group, Item as Item$1, ItemIndicator, Label as Label$1, Portal as Portal$2, RadioGroup as RadioGroup$1, RadioItem, Root as Root$3, Separator as Separator$1, Sub, SubContent, SubTrigger, Trigger as Trigger$3 } from "@radix-ui/react-dropdown-menu";
|
|
18
19
|
import { CheckIcon as CheckIcon$1, ChevronRightIcon as ChevronRightIcon$1, CircleIcon } from "lucide-react";
|
|
19
20
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
20
21
|
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
21
22
|
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
22
|
-
import { Content as Content$
|
|
23
|
-
import { Root as Root$
|
|
23
|
+
import { Content as Content$4, Group as Group$1, Icon as Icon$1, Item as Item$2, ItemIndicator as ItemIndicator$1, ItemText, Label as Label$2, Portal as Portal$3, Root as Root$4, ScrollDownButton, ScrollUpButton, Separator as Separator$2, Trigger as Trigger$4, Value, Viewport } from "@radix-ui/react-select";
|
|
24
|
+
import { Root as Root$5 } from "@radix-ui/react-separator";
|
|
24
25
|
import { useTheme } from "next-themes";
|
|
25
26
|
import { Toaster as Toaster$1 } from "sonner";
|
|
26
27
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
27
|
-
import { Content as Content$
|
|
28
|
+
import { Content as Content$5, Portal as Portal$4, Provider, Root as Root$6, Trigger as Trigger$5 } from "@radix-ui/react-tooltip";
|
|
28
29
|
import Link from "next/link";
|
|
29
30
|
|
|
30
31
|
//#region src/components/unsaved-changes-bar/unsaved-changes-bar.tsx
|
|
@@ -321,15 +322,15 @@ const AccordionContent = ({ className, children, ...props }) => {
|
|
|
321
322
|
|
|
322
323
|
//#endregion
|
|
323
324
|
//#region src/components/ui/alert-dialog/alert-dialog.tsx
|
|
324
|
-
const AlertDialog = Root;
|
|
325
|
-
const AlertDialogTrigger = Trigger;
|
|
325
|
+
const AlertDialog = Root$1;
|
|
326
|
+
const AlertDialogTrigger = Trigger$1;
|
|
326
327
|
const AlertDialogPortal = Portal;
|
|
327
328
|
const AlertDialogOverlay = ({ className, ...props }) => /* @__PURE__ */ jsx(Overlay, {
|
|
328
329
|
"data-slot": "alert-dialog-overlay",
|
|
329
330
|
className: cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-[var(--overlay-md)] backdrop-blur-[2px] will-change-[opacity] duration-200 motion-reduce:animate-none", className),
|
|
330
331
|
...props
|
|
331
332
|
});
|
|
332
|
-
const AlertDialogContent = ({ className, size = "default", ...props }) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(Content, {
|
|
333
|
+
const AlertDialogContent = ({ className, size = "default", ...props }) => /* @__PURE__ */ jsxs(AlertDialogPortal, { children: [/* @__PURE__ */ jsx(AlertDialogOverlay, {}), /* @__PURE__ */ jsx(Content$1, {
|
|
333
334
|
"data-slot": "alert-dialog-content",
|
|
334
335
|
"data-size": size,
|
|
335
336
|
className: cn("bg-muted overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 group/alert-dialog-content fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-none duration-200 data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none", className),
|
|
@@ -548,8 +549,8 @@ const CollapsibleContent = ({ ...props }) => /* @__PURE__ */ jsx(CollapsiblePrim
|
|
|
548
549
|
|
|
549
550
|
//#endregion
|
|
550
551
|
//#region src/components/ui/dialog/dialog.tsx
|
|
551
|
-
const Dialog = Root$
|
|
552
|
-
const DialogTrigger = Trigger$
|
|
552
|
+
const Dialog = Root$2;
|
|
553
|
+
const DialogTrigger = Trigger$2;
|
|
553
554
|
const DialogPortal = Portal$1;
|
|
554
555
|
const DialogClose = Close;
|
|
555
556
|
const DialogOverlay = ({ className, ...props }) => /* @__PURE__ */ jsx(Overlay$1, {
|
|
@@ -559,7 +560,7 @@ const DialogOverlay = ({ className, ...props }) => /* @__PURE__ */ jsx(Overlay$1
|
|
|
559
560
|
});
|
|
560
561
|
const DialogContent = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(DialogPortal, {
|
|
561
562
|
"data-slot": "dialog-portal",
|
|
562
|
-
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(Content$
|
|
563
|
+
children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsx(Content$2, {
|
|
563
564
|
"data-slot": "dialog-content",
|
|
564
565
|
className: cn("bg-card overflow-hidden data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-98 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] rounded-[16px] border-0 shadow-none duration-200 data-[state=open]:ease-out data-[state=closed]:ease-in outline-none sm:max-w-md will-change-[opacity,transform] motion-reduce:animate-none", className),
|
|
565
566
|
...props,
|
|
@@ -752,23 +753,23 @@ const CommandShortcut = ({ className, ...props }) => /* @__PURE__ */ jsx("span",
|
|
|
752
753
|
|
|
753
754
|
//#endregion
|
|
754
755
|
//#region src/components/ui/dropdown-menu/dropdown-menu.tsx
|
|
755
|
-
const DropdownMenu = Root$
|
|
756
|
-
const DropdownMenuTrigger = Trigger$
|
|
756
|
+
const DropdownMenu = Root$3;
|
|
757
|
+
const DropdownMenuTrigger = Trigger$3;
|
|
757
758
|
const DropdownMenuGroup = Group;
|
|
758
759
|
const DropdownMenuSub = Sub;
|
|
759
|
-
const DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Portal$2, { children: /* @__PURE__ */ jsx(Content$
|
|
760
|
+
const DropdownMenuContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Portal$2, { children: /* @__PURE__ */ jsx(Content$3, {
|
|
760
761
|
ref,
|
|
761
762
|
sideOffset,
|
|
762
763
|
className: cn("z-50 min-w-32 overflow-hidden rounded-md bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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", className),
|
|
763
764
|
...props
|
|
764
765
|
}) }));
|
|
765
|
-
DropdownMenuContent.displayName = Content$
|
|
766
|
-
const DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(Item, {
|
|
766
|
+
DropdownMenuContent.displayName = Content$3.displayName;
|
|
767
|
+
const DropdownMenuItem = forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(Item$1, {
|
|
767
768
|
ref,
|
|
768
769
|
className: cn("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=\"size-\"])]:size-4", inset && "pl-8", className),
|
|
769
770
|
...props
|
|
770
771
|
}));
|
|
771
|
-
DropdownMenuItem.displayName = Item.displayName;
|
|
772
|
+
DropdownMenuItem.displayName = Item$1.displayName;
|
|
772
773
|
const DropdownMenuCheckboxItem = forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(CheckboxItem, {
|
|
773
774
|
ref,
|
|
774
775
|
className: cn("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50", className),
|
|
@@ -1008,7 +1009,7 @@ const SearchInput = ({ className, placeholder = "Search...", shortcut = "⌘K",
|
|
|
1008
1009
|
|
|
1009
1010
|
//#endregion
|
|
1010
1011
|
//#region src/components/ui/select/select.tsx
|
|
1011
|
-
const Select = ({ ...props }) => /* @__PURE__ */ jsx(Root$
|
|
1012
|
+
const Select = ({ ...props }) => /* @__PURE__ */ jsx(Root$4, {
|
|
1012
1013
|
"data-slot": "select",
|
|
1013
1014
|
...props
|
|
1014
1015
|
});
|
|
@@ -1020,7 +1021,7 @@ const SelectValue = ({ ...props }) => /* @__PURE__ */ jsx(Value, {
|
|
|
1020
1021
|
"data-slot": "select-value",
|
|
1021
1022
|
...props
|
|
1022
1023
|
});
|
|
1023
|
-
const SelectTrigger = ({ className, size = "default", children, ...props }) => /* @__PURE__ */ jsxs(Trigger$
|
|
1024
|
+
const SelectTrigger = ({ className, size = "default", children, ...props }) => /* @__PURE__ */ jsxs(Trigger$4, {
|
|
1024
1025
|
"data-slot": "select-trigger",
|
|
1025
1026
|
"data-size": size,
|
|
1026
1027
|
className: cn("data-[placeholder]:text-muted-foreground/60 [&_svg:not([class*='text-'])]:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 flex w-fit touch-manipulation items-center justify-between gap-1.5 rounded-md border-0 bg-transparent px-3 py-2 text-[13px] whitespace-nowrap shadow-[var(--shadow-input)] hover:shadow-[var(--shadow-input-hover)] transition-[color,box-shadow] duration-100 ease-out outline-none focus-visible:shadow-[0_0_0_1px_var(--ring),0_0_0_4px_rgba(0,114,239,0.15)] aria-invalid:shadow-[0_0_0_1px_var(--destructive)] disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:text-[13px] data-[size=sm]:px-2.5 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className),
|
|
@@ -1034,7 +1035,7 @@ const SelectTrigger = ({ className, size = "default", children, ...props }) => /
|
|
|
1034
1035
|
})
|
|
1035
1036
|
})]
|
|
1036
1037
|
});
|
|
1037
|
-
const SelectContent = ({ className, children, position = "popper", align = "start", ...props }) => /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsxs(Content$
|
|
1038
|
+
const SelectContent = ({ className, children, position = "popper", align = "start", ...props }) => /* @__PURE__ */ jsx(Portal$3, { children: /* @__PURE__ */ jsxs(Content$4, {
|
|
1038
1039
|
"data-slot": "select-content",
|
|
1039
1040
|
className: cn("bg-popover text-popover-foreground will-change-[opacity,transform] data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=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 relative z-50 max-h-(--radix-select-content-available-height) min-w-[8rem] origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-xl border-0 shadow-[var(--shadow-elevated)]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
1040
1041
|
position,
|
|
@@ -1054,7 +1055,7 @@ const SelectLabel = ({ className, ...props }) => /* @__PURE__ */ jsx(Label$2, {
|
|
|
1054
1055
|
className: cn("text-muted-foreground px-2 py-1.5 text-xs", className),
|
|
1055
1056
|
...props
|
|
1056
1057
|
});
|
|
1057
|
-
const SelectItem = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Item$
|
|
1058
|
+
const SelectItem = ({ className, children, ...props }) => /* @__PURE__ */ jsxs(Item$2, {
|
|
1058
1059
|
"data-slot": "select-item",
|
|
1059
1060
|
className: cn("focus:bg-accent focus:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex w-full cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2", className),
|
|
1060
1061
|
...props,
|
|
@@ -1135,14 +1136,14 @@ const SelectableCard = ({ badge, className, description, icon, iconSize = 20, la
|
|
|
1135
1136
|
|
|
1136
1137
|
//#endregion
|
|
1137
1138
|
//#region src/components/ui/separator/separator.tsx
|
|
1138
|
-
const Separator = forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(Root$
|
|
1139
|
+
const Separator = forwardRef(({ className, orientation = "horizontal", decorative = true, ...props }, ref) => /* @__PURE__ */ jsx(Root$5, {
|
|
1139
1140
|
ref,
|
|
1140
1141
|
decorative,
|
|
1141
1142
|
orientation,
|
|
1142
1143
|
className: cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", className),
|
|
1143
1144
|
...props
|
|
1144
1145
|
}));
|
|
1145
|
-
Separator.displayName = Root$
|
|
1146
|
+
Separator.displayName = Root$5.displayName;
|
|
1146
1147
|
|
|
1147
1148
|
//#endregion
|
|
1148
1149
|
//#region src/components/ui/sheet/sheet.tsx
|
|
@@ -1419,15 +1420,15 @@ const Textarea = ({ className, ...props }) => {
|
|
|
1419
1420
|
//#endregion
|
|
1420
1421
|
//#region src/components/ui/tooltip/tooltip.tsx
|
|
1421
1422
|
const TooltipProvider = Provider;
|
|
1422
|
-
const Tooltip = Root$
|
|
1423
|
-
const TooltipTrigger = Trigger$
|
|
1424
|
-
const TooltipContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Portal$4, { children: /* @__PURE__ */ jsx(Content$
|
|
1423
|
+
const Tooltip = Root$6;
|
|
1424
|
+
const TooltipTrigger = Trigger$5;
|
|
1425
|
+
const TooltipContent = forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(Portal$4, { children: /* @__PURE__ */ jsx(Content$5, {
|
|
1425
1426
|
ref,
|
|
1426
1427
|
sideOffset,
|
|
1427
1428
|
className: cn("z-50 overflow-hidden rounded-md bg-primary px-3 py-1.5 text-xs text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-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", className),
|
|
1428
1429
|
...props
|
|
1429
1430
|
}) }));
|
|
1430
|
-
TooltipContent.displayName = Content$
|
|
1431
|
+
TooltipContent.displayName = Content$5.displayName;
|
|
1431
1432
|
|
|
1432
1433
|
//#endregion
|
|
1433
1434
|
//#region src/components/ui/well/well.tsx
|
|
@@ -2156,6 +2157,189 @@ const StatusBadge = ({ status, label, className }) => {
|
|
|
2156
2157
|
});
|
|
2157
2158
|
};
|
|
2158
2159
|
|
|
2160
|
+
//#endregion
|
|
2161
|
+
//#region src/components/toggle-card/toggle-card.tsx
|
|
2162
|
+
/**
|
|
2163
|
+
* ToggleCard — droplet's rich toggle composite.
|
|
2164
|
+
*
|
|
2165
|
+
* Rebuilt from Northstar's SingleToggleCard to support the redcoast dashboard
|
|
2166
|
+
* migration. ToggleRow (sibling primitive) remains the minimal/canonical
|
|
2167
|
+
* single-line toggle; ToggleCard is the multi-feature card variant with:
|
|
2168
|
+
* - Accordion expand/collapse for nested children
|
|
2169
|
+
* - Pluggable input type: switch (default), radio, or checkbox
|
|
2170
|
+
* - Optional left icon
|
|
2171
|
+
* - Tags row above the title and a RightSideTags slot on the right
|
|
2172
|
+
* - Optional notification dot in the trigger
|
|
2173
|
+
* - Optional `actionLink` rendered below content
|
|
2174
|
+
* - Optional `customActionIcon` rendered alongside the trigger affordance
|
|
2175
|
+
* - Whole-card click handler
|
|
2176
|
+
*
|
|
2177
|
+
* The API mirrors Northstar SingleToggleCard so a redcoast migration can be a
|
|
2178
|
+
* mechanical rename. Where the Northstar API surfaced layout-tuning props
|
|
2179
|
+
* (`disableHover`, `dontSeparateContentFromHeader`, `descriptionModificators`,
|
|
2180
|
+
* `titleModificators`) the equivalent expression here is via Tailwind classes
|
|
2181
|
+
* on `className` or `triggerClassName`.
|
|
2182
|
+
*
|
|
2183
|
+
* Authored in droplet so a single canonical card is available across teams.
|
|
2184
|
+
* Backed by Card + Switch/Checkbox/RadioGroup + Radix Accordion.
|
|
2185
|
+
*/
|
|
2186
|
+
const inputCommon = "shrink-0 touch-manipulation cursor-pointer disabled:cursor-not-allowed disabled:opacity-50";
|
|
2187
|
+
const renderInput = (input, id) => {
|
|
2188
|
+
if (!input || input.hidden) return null;
|
|
2189
|
+
if (input.isLocked) return /* @__PURE__ */ jsx("div", {
|
|
2190
|
+
"aria-label": "Locked",
|
|
2191
|
+
title: "Locked",
|
|
2192
|
+
className: "shrink-0 inline-flex items-center justify-center size-5 rounded-full bg-muted text-muted-foreground mt-0.5",
|
|
2193
|
+
children: /* @__PURE__ */ jsxs("svg", {
|
|
2194
|
+
className: "size-3",
|
|
2195
|
+
viewBox: "0 0 24 24",
|
|
2196
|
+
fill: "none",
|
|
2197
|
+
stroke: "currentColor",
|
|
2198
|
+
strokeWidth: "2",
|
|
2199
|
+
strokeLinecap: "round",
|
|
2200
|
+
strokeLinejoin: "round",
|
|
2201
|
+
"aria-hidden": true,
|
|
2202
|
+
children: [/* @__PURE__ */ jsx("rect", {
|
|
2203
|
+
x: "3",
|
|
2204
|
+
y: "11",
|
|
2205
|
+
width: "18",
|
|
2206
|
+
height: "11",
|
|
2207
|
+
rx: "2",
|
|
2208
|
+
ry: "2"
|
|
2209
|
+
}), /* @__PURE__ */ jsx("path", { d: "M7 11V7a5 5 0 0110 0v4" })]
|
|
2210
|
+
})
|
|
2211
|
+
});
|
|
2212
|
+
const type = input.type ?? "toggle";
|
|
2213
|
+
const handleChange = (next) => {
|
|
2214
|
+
if (!input.onChange) return;
|
|
2215
|
+
input.onChange({ target: {
|
|
2216
|
+
checked: next,
|
|
2217
|
+
name: input.name ?? ""
|
|
2218
|
+
} });
|
|
2219
|
+
};
|
|
2220
|
+
if (type === "toggle") return /* @__PURE__ */ jsx(Switch, {
|
|
2221
|
+
id: input.id ?? id,
|
|
2222
|
+
checked: Boolean(input.checked),
|
|
2223
|
+
disabled: input.disabled,
|
|
2224
|
+
onCheckedChange: handleChange,
|
|
2225
|
+
className: cn(inputCommon, "mt-0.5")
|
|
2226
|
+
});
|
|
2227
|
+
if (type === "checkbox") return /* @__PURE__ */ jsx(Checkbox, {
|
|
2228
|
+
id: input.id ?? id,
|
|
2229
|
+
checked: Boolean(input.checked),
|
|
2230
|
+
disabled: input.disabled,
|
|
2231
|
+
onCheckedChange: (state) => handleChange(state === true),
|
|
2232
|
+
className: cn(inputCommon, "mt-1")
|
|
2233
|
+
});
|
|
2234
|
+
return /* @__PURE__ */ jsx(RadioGroup, {
|
|
2235
|
+
value: input.checked ? input.id ?? id : "",
|
|
2236
|
+
onValueChange: (v) => handleChange(v === (input.id ?? id)),
|
|
2237
|
+
disabled: input.disabled,
|
|
2238
|
+
className: "shrink-0 mt-0.5",
|
|
2239
|
+
children: /* @__PURE__ */ jsx(RadioGroupItem, {
|
|
2240
|
+
id: input.id ?? id,
|
|
2241
|
+
value: input.id ?? id,
|
|
2242
|
+
className: inputCommon
|
|
2243
|
+
})
|
|
2244
|
+
});
|
|
2245
|
+
};
|
|
2246
|
+
const ToggleCard = ({ accordionKey, title, description, inputProps, allowExpand = true, defaultExpanded, value, onValueChange, collapsible = true, Tags, RightSideTags, notification, actionLink, customActionIcon, onCardClick: _onCardClick, children, disabled, triggerTestId, className, triggerClassName }) => {
|
|
2247
|
+
const generatedId = useId();
|
|
2248
|
+
const inputId = inputProps?.id ?? generatedId;
|
|
2249
|
+
const isParentMode = !allowExpand && Boolean(children);
|
|
2250
|
+
const renderContent = () => {
|
|
2251
|
+
const actionLinkButton = actionLink ? /* @__PURE__ */ jsx("button", {
|
|
2252
|
+
type: "button",
|
|
2253
|
+
onClick: actionLink.onClick,
|
|
2254
|
+
className: "mt-3 text-sm font-medium text-(--action) hover:underline underline-offset-4 cursor-pointer",
|
|
2255
|
+
children: actionLink.text
|
|
2256
|
+
}) : null;
|
|
2257
|
+
if (allowExpand) return /* @__PURE__ */ jsxs(Content, {
|
|
2258
|
+
className: "border-t border-border-divider px-5 py-4",
|
|
2259
|
+
children: [children, actionLinkButton]
|
|
2260
|
+
});
|
|
2261
|
+
if (!children && !actionLink) return null;
|
|
2262
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
2263
|
+
className: "border-t border-border-divider bg-card px-5 py-3 space-y-2",
|
|
2264
|
+
children: [children, actionLinkButton]
|
|
2265
|
+
});
|
|
2266
|
+
};
|
|
2267
|
+
return /* @__PURE__ */ jsx(Root, {
|
|
2268
|
+
type: "single",
|
|
2269
|
+
collapsible,
|
|
2270
|
+
defaultValue: defaultExpanded ? accordionKey : void 0,
|
|
2271
|
+
value,
|
|
2272
|
+
onValueChange,
|
|
2273
|
+
"data-slot": "toggle-card",
|
|
2274
|
+
className: cn("rounded-xl bg-card shadow-card overflow-hidden", disabled && "opacity-60", className),
|
|
2275
|
+
children: /* @__PURE__ */ jsxs(Item, {
|
|
2276
|
+
value: accordionKey,
|
|
2277
|
+
className: "border-0",
|
|
2278
|
+
children: [/* @__PURE__ */ jsx(Header, {
|
|
2279
|
+
className: "m-0",
|
|
2280
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
2281
|
+
className: cn("group flex items-start gap-3 px-5 py-4", isParentMode && "bg-bg-bottom", triggerClassName),
|
|
2282
|
+
children: [
|
|
2283
|
+
renderInput(inputProps, inputId),
|
|
2284
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2285
|
+
className: "flex-1 min-w-0",
|
|
2286
|
+
children: [
|
|
2287
|
+
title && /* @__PURE__ */ jsxs("div", {
|
|
2288
|
+
className: "flex items-baseline gap-1.5 flex-wrap leading-5",
|
|
2289
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
2290
|
+
htmlFor: inputId,
|
|
2291
|
+
className: cn("text-sm font-medium select-none leading-5", disabled && "text-muted-foreground"),
|
|
2292
|
+
children: [title, notification && /* @__PURE__ */ jsx("span", {
|
|
2293
|
+
"aria-hidden": true,
|
|
2294
|
+
className: "inline-block ml-1.5 size-1.5 rounded-full bg-destructive align-middle"
|
|
2295
|
+
})]
|
|
2296
|
+
}), Tags && Tags.length > 0 && /* @__PURE__ */ jsx(Fragment, { children: Tags.map((t) => /* @__PURE__ */ jsx("span", {
|
|
2297
|
+
className: "leading-5",
|
|
2298
|
+
children: t.Tag
|
|
2299
|
+
}, t.id)) })]
|
|
2300
|
+
}),
|
|
2301
|
+
!title && Tags && Tags.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
2302
|
+
className: "flex items-baseline gap-1.5 mb-1 leading-5",
|
|
2303
|
+
children: Tags.map((t) => /* @__PURE__ */ jsx("span", {
|
|
2304
|
+
className: "leading-5",
|
|
2305
|
+
children: t.Tag
|
|
2306
|
+
}, t.id))
|
|
2307
|
+
}),
|
|
2308
|
+
description && /* @__PURE__ */ jsx("p", {
|
|
2309
|
+
className: "text-sm text-muted-foreground mt-0.5 text-pretty",
|
|
2310
|
+
children: description
|
|
2311
|
+
})
|
|
2312
|
+
]
|
|
2313
|
+
}),
|
|
2314
|
+
/* @__PURE__ */ jsxs("div", {
|
|
2315
|
+
className: "flex items-center gap-2 shrink-0 self-start",
|
|
2316
|
+
children: [RightSideTags && RightSideTags.length > 0 && /* @__PURE__ */ jsx("div", {
|
|
2317
|
+
className: "flex items-center gap-1.5",
|
|
2318
|
+
children: RightSideTags.map((t) => /* @__PURE__ */ jsx("span", { children: t.Tag }, t.id))
|
|
2319
|
+
}), allowExpand && /* @__PURE__ */ jsx(Trigger, {
|
|
2320
|
+
"data-testid": triggerTestId,
|
|
2321
|
+
className: cn("shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground transition-[transform,background-color] duration-150 hover:bg-overlay-hover [&[data-state=open]>svg]:rotate-180", customActionIcon?.className),
|
|
2322
|
+
disabled: !allowExpand,
|
|
2323
|
+
children: customActionIcon ? customActionIcon.Icon : /* @__PURE__ */ jsx("svg", {
|
|
2324
|
+
className: "size-4",
|
|
2325
|
+
viewBox: "0 0 24 24",
|
|
2326
|
+
fill: "none",
|
|
2327
|
+
stroke: "currentColor",
|
|
2328
|
+
strokeWidth: "2",
|
|
2329
|
+
strokeLinecap: "round",
|
|
2330
|
+
strokeLinejoin: "round",
|
|
2331
|
+
"aria-hidden": true,
|
|
2332
|
+
children: /* @__PURE__ */ jsx("polyline", { points: "6 9 12 15 18 9" })
|
|
2333
|
+
})
|
|
2334
|
+
})]
|
|
2335
|
+
})
|
|
2336
|
+
]
|
|
2337
|
+
})
|
|
2338
|
+
}), renderContent()]
|
|
2339
|
+
})
|
|
2340
|
+
});
|
|
2341
|
+
};
|
|
2342
|
+
|
|
2159
2343
|
//#endregion
|
|
2160
2344
|
//#region src/components/icons/arrow-up-right/arrow-up-right.tsx
|
|
2161
2345
|
const ArrowUpRightIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(AnimatedIcon, {
|
|
@@ -3663,5 +3847,5 @@ const UsersIcon = forwardRef((props, ref) => /* @__PURE__ */ jsx(AnimatedIcon, {
|
|
|
3663
3847
|
UsersIcon.displayName = "UsersIcon";
|
|
3664
3848
|
|
|
3665
3849
|
//#endregion
|
|
3666
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedIcon, ArrowUpRightIcon, AskAIAction, AssetIcon, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartBarIncreasingIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ClaudeLogo, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyButton, CopyCheckIcon, CopyIcon, CursorLogo, DangerZone, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DollarSignIcon, DomainList, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FingerprintIcon, HomeIcon, Icon, IconConfigProvider, InfoBanner, Input, Kbd, KeyIcon, Label, LayoutPanelTopIcon, LinkIcon, MetricCard, MoonIcon, OpenAILogo, PageSkeleton, PanelLeftCloseIcon, PanelLeftOpenIcon, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductPageLayout, Progress, RadioGroup, RadioGroupItem, RefreshCWIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, Separator, SettingsIcon, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShieldCheckIcon, Skeleton, Spinner, StatCardSkeleton, StatusBadge, SunIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TerminalIcon, Textarea, Toaster, ToggleRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnsavedChangesBar, UsersIcon, VSCodeLogo, WebhooksAction, Well, WellReveal, WindsurfLogo, badgeVariants, buttonVariants, cn, useIconConfig, useUnsavedChanges, wellVariants };
|
|
3850
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogOverlay, AlertDialogPortal, AlertDialogTitle, AlertDialogTrigger, AnimatedIcon, ArrowUpRightIcon, AskAIAction, AssetIcon, Avatar, AvatarFallback, AvatarImage, Badge, Button, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, ChartBarIncreasingIcon, CheckIcon, Checkbox, ChevronDownIcon, ChevronRightIcon, ClaudeLogo, CodeBlock, Collapsible, CollapsibleContent, CollapsibleTrigger, Command, CommandDialog, CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator, CommandShortcut, CopyButton, CopyCheckIcon, CopyIcon, CursorLogo, DangerZone, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DollarSignIcon, DomainList, DownloadIcon, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, EmptyState, FingerprintIcon, HomeIcon, Icon, IconConfigProvider, InfoBanner, Input, Kbd, KeyIcon, Label, LayoutPanelTopIcon, LinkIcon, MetricCard, MoonIcon, OpenAILogo, PageSkeleton, PanelLeftCloseIcon, PanelLeftOpenIcon, PlusIcon, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, ProductPageLayout, Progress, RadioGroup, RadioGroupItem, RefreshCWIcon, ScrollArea, ScrollBar, SearchIcon, SearchInput, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCard, Separator, SettingsIcon, SettingsSection, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShieldCheckIcon, Skeleton, Spinner, StatCardSkeleton, StatusBadge, SunIcon, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsList, TabsTrigger, TerminalIcon, Textarea, Toaster, ToggleCard, ToggleRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, UnsavedChangesBar, UsersIcon, VSCodeLogo, WebhooksAction, Well, WellReveal, WindsurfLogo, badgeVariants, buttonVariants, cn, useIconConfig, useUnsavedChanges, wellVariants };
|
|
3667
3851
|
//# sourceMappingURL=index.esm.js.map
|