@litelens/design-system 1.7.16 → 1.8.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.
@@ -1,5 +1,5 @@
1
1
  import { Tooltip, TooltipTrigger, TooltipContent, Button, DropdownMenuItem, TooltipProvider, Sheet, SheetContent, SheetHeader, ScrollArea, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, Dialog, DialogContent, DialogHeader, DialogTitle, DialogFooter, TableRow, TableCell, toast, Badge } from './chunk-NYDY6TL7.js';
2
- import { CheckIcon, CopyIcon, Loader2Icon, MinusIcon, PlusIcon, Trash2Icon, PencilIcon, RefreshCwIcon, ScalingIcon, XCircleIcon, CheckCircle2Icon, SearchIcon, Input, ChevronLeftIcon, ChevronRightIcon, CircleCheckIcon, CircleXIcon } from './chunk-D6C5AENV.js';
2
+ import { CheckIcon, CopyIcon, Loader2Icon, MinusIcon, PlusIcon, Trash2Icon, PencilIcon, RefreshCwIcon, PlayIcon, RocketIcon, ScalingIcon, XCircleIcon, CheckCircle2Icon, SearchIcon, Input, ChevronLeftIcon, ChevronRightIcon, CircleCheckIcon, CircleXIcon } from './chunk-D6C5AENV.js';
3
3
  import { cn } from './chunk-QUNCRUSO.js';
4
4
  import { useRef, useState, useLayoutEffect, Component, useMemo } from 'react';
5
5
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
@@ -13,10 +13,10 @@ var AnnotationBadge = ({ label }) => {
13
13
  const el = spanRef.current;
14
14
  if (el) setIsOverflowing(el.scrollWidth > el.clientWidth);
15
15
  }, [label]);
16
- const badge = /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "max-w-2xs cursor-default font-mono text-xs", children: /* @__PURE__ */ jsx("span", { ref: spanRef, className: "block truncate", children: label }) });
16
+ const badge = /* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "max-w-full min-w-0 cursor-default font-mono text-xs", children: /* @__PURE__ */ jsx("span", { ref: spanRef, className: "block truncate", children: label }) });
17
17
  if (!isOverflowing) return badge;
18
18
  return /* @__PURE__ */ jsxs(Tooltip, { children: [
19
- /* @__PURE__ */ jsx(TooltipTrigger, { className: "text-left", children: badge }),
19
+ /* @__PURE__ */ jsx(TooltipTrigger, { className: "max-w-full min-w-0 text-left", children: badge }),
20
20
  /* @__PURE__ */ jsx(TooltipContent, { children: /* @__PURE__ */ jsx("span", { className: "font-mono break-all", children: label }) })
21
21
  ] });
22
22
  };
@@ -382,6 +382,70 @@ var ResourceRestartButton = ({
382
382
  "Restart"
383
383
  ] });
384
384
  };
385
+ var ResourceResumeButton = ({
386
+ onClick,
387
+ mode = "menu-item",
388
+ ariaLabel = "Resume",
389
+ disabled
390
+ }) => {
391
+ if (mode === "icon-button") {
392
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
393
+ /* @__PURE__ */ jsx(
394
+ TooltipTrigger,
395
+ {
396
+ render: /* @__PURE__ */ jsx(
397
+ Button,
398
+ {
399
+ "aria-label": ariaLabel,
400
+ variant: "ghost",
401
+ size: "icon-sm",
402
+ disabled,
403
+ onClick,
404
+ children: /* @__PURE__ */ jsx(PlayIcon, {})
405
+ }
406
+ )
407
+ }
408
+ ),
409
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: "Resume" })
410
+ ] });
411
+ }
412
+ return /* @__PURE__ */ jsxs(DropdownMenuItem, { disabled, onClick, children: [
413
+ /* @__PURE__ */ jsx(PlayIcon, { className: "mr-2 size-3.5" }),
414
+ "Resume"
415
+ ] });
416
+ };
417
+ var ResourceRunNowButton = ({
418
+ onClick,
419
+ mode = "menu-item",
420
+ ariaLabel = "Run Now",
421
+ disabled
422
+ }) => {
423
+ if (mode === "icon-button") {
424
+ return /* @__PURE__ */ jsxs(Tooltip, { children: [
425
+ /* @__PURE__ */ jsx(
426
+ TooltipTrigger,
427
+ {
428
+ render: /* @__PURE__ */ jsx(
429
+ Button,
430
+ {
431
+ "aria-label": ariaLabel,
432
+ variant: "ghost",
433
+ size: "icon-sm",
434
+ disabled,
435
+ onClick,
436
+ children: /* @__PURE__ */ jsx(RocketIcon, {})
437
+ }
438
+ )
439
+ }
440
+ ),
441
+ /* @__PURE__ */ jsx(TooltipContent, { side: "bottom", children: "Run Now" })
442
+ ] });
443
+ }
444
+ return /* @__PURE__ */ jsxs(DropdownMenuItem, { disabled, onClick, children: [
445
+ /* @__PURE__ */ jsx(RocketIcon, { className: "mr-2 size-3.5" }),
446
+ "Run Now"
447
+ ] });
448
+ };
385
449
  var ResourceScaleButton = ({
386
450
  onClick,
387
451
  mode = "menu-item",
@@ -880,4 +944,4 @@ function renderErrorToast(props) {
880
944
  );
881
945
  }
882
946
 
883
- export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast };
947
+ export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceResumeButton, ResourceRunNowButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast };
@@ -121,6 +121,22 @@ interface ResourceRestartButtonProps {
121
121
  }
122
122
  declare const ResourceRestartButton: FC<ResourceRestartButtonProps>;
123
123
 
124
+ interface ResourceResumeButtonProps {
125
+ onClick: () => void;
126
+ mode?: "menu-item" | "icon-button";
127
+ ariaLabel?: string;
128
+ disabled?: boolean;
129
+ }
130
+ declare const ResourceResumeButton: FC<ResourceResumeButtonProps>;
131
+
132
+ interface ResourceRunNowButtonProps {
133
+ onClick: () => void;
134
+ mode?: "menu-item" | "icon-button";
135
+ ariaLabel?: string;
136
+ disabled?: boolean;
137
+ }
138
+ declare const ResourceRunNowButton: FC<ResourceRunNowButtonProps>;
139
+
124
140
  interface ResourceScaleButtonProps {
125
141
  onClick: () => void;
126
142
  mode?: "menu-item" | "icon-button";
@@ -263,4 +279,4 @@ declare function renderErrorToast(props: ErrorToastProps): void;
263
279
 
264
280
  declare const TOAST_STYLE: CSSProperties;
265
281
 
266
- export { AnnotationBadge, ButtonGroup, type ButtonGroupProps, ConfirmationModal, Divider, DonutChart, EmptyState, type EmptyStateProps, ErrorBoundary, ErrorToast, type ErrorToastProps, FormModal, LineIcon, LoadingSpinner, type LoadingSpinnerProps, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, type ResourceDetailDrawerProps, ResourceDetailEmptyBody, type ResourceDetailEmptyBodyProps, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, type SuccessToastProps, TOAST_STYLE, TablePagination, type TablePaginationProps, TableSkeletonLoader, type TableSkeletonLoaderProps, TableSkeletonRow, type TableSkeletonRowProps, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast };
282
+ export { AnnotationBadge, ButtonGroup, type ButtonGroupProps, ConfirmationModal, Divider, DonutChart, EmptyState, type EmptyStateProps, ErrorBoundary, ErrorToast, type ErrorToastProps, FormModal, LineIcon, LoadingSpinner, type LoadingSpinnerProps, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, type ResourceDetailDrawerProps, ResourceDetailEmptyBody, type ResourceDetailEmptyBodyProps, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceResumeButton, ResourceRunNowButton, ResourceScaleButton, SearchInput, SuccessToast, type SuccessToastProps, TOAST_STYLE, TablePagination, type TablePaginationProps, TableSkeletonLoader, type TableSkeletonLoaderProps, TableSkeletonRow, type TableSkeletonRowProps, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast };
@@ -1,4 +1,4 @@
1
- export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from '../chunk-4Y7KRKM5.js';
1
+ export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceResumeButton, ResourceRunNowButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from '../chunk-KXTZEQEK.js';
2
2
  import '../chunk-NYDY6TL7.js';
3
3
  import '../chunk-D6C5AENV.js';
4
4
  import '../chunk-QUNCRUSO.js';
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  export { AppleIcon, Badge, Button, Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, GithubIcon, Input, LinuxIcon, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Slider, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, TextareaProps, Toaster, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, WindowsIcon, buttonVariants, textareaVariants } from './atoms/index.js';
2
2
  export { toast } from 'sonner';
3
- export { AnnotationBadge, ButtonGroup, ButtonGroupProps, ConfirmationModal, Divider, DonutChart, EmptyState, EmptyStateProps, ErrorBoundary, ErrorToast, ErrorToastProps, FormModal, LineIcon, LoadingSpinner, LoadingSpinnerProps, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailDrawerProps, ResourceDetailEmptyBody, ResourceDetailEmptyBodyProps, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, SuccessToastProps, TOAST_STYLE, TablePagination, TablePaginationProps, TableSkeletonLoader, TableSkeletonLoaderProps, TableSkeletonRow, TableSkeletonRowProps, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './components/index.js';
3
+ export { AnnotationBadge, ButtonGroup, ButtonGroupProps, ConfirmationModal, Divider, DonutChart, EmptyState, EmptyStateProps, ErrorBoundary, ErrorToast, ErrorToastProps, FormModal, LineIcon, LoadingSpinner, LoadingSpinnerProps, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailDrawerProps, ResourceDetailEmptyBody, ResourceDetailEmptyBodyProps, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceResumeButton, ResourceRunNowButton, ResourceScaleButton, SearchInput, SuccessToast, SuccessToastProps, TOAST_STYLE, TablePagination, TablePaginationProps, TableSkeletonLoader, TableSkeletonLoaderProps, TableSkeletonRow, TableSkeletonRowProps, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './components/index.js';
4
4
  export { BREAKPOINTS, Breakpoint, useBreakpoint, useCopyToClipboard, useMediaQuery } from './hooks/index.js';
5
5
  export { clamp, cn, formatRelativeTime, formatTs } from './utils/index.js';
6
6
  export { FullTextSearchInput, SplitAndHighlightText, UseFullTextSearchCustomOptions, UseFullTextSearchOptions, UseFullTextSearchReturn, UseFullTextSearchWithHandlersReturn, useFullTextSearch } from './libs/index.js';
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { Checkbox, Collapsible, CollapsiblePanel, CollapsibleTrigger, ContextMenu, ContextMenuContent, ContextMenuItem, ContextMenuPortal, ContextMenuSeparator, ContextMenuTrigger, Drawer, DrawerContent, DrawerPopup, DrawerPortal, DrawerViewport, Separator, Slider, Switch, Tabs, TabsContent, TabsIndicator, TabsList, TabsTrigger, Textarea, Toaster, textareaVariants } from './chunk-HT3CL5WR.js';
2
- export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './chunk-4Y7KRKM5.js';
2
+ export { AnnotationBadge, ButtonGroup, ConfirmationModal, Divider, DonutChart, EmptyState, ErrorBoundary, ErrorToast, FormModal, LineIcon, LoadingSpinner, Markdown, ResourceBulkDeletionButton, ResourceCell, ResourceCreationButton, ResourceDeletionButton, ResourceDetailDrawer, ResourceDetailDrawerBody, ResourceDetailDrawerHeader, ResourceDetailEmptyBody, ResourceLink, ResourceModificationButton, ResourceRestartButton, ResourceResumeButton, ResourceRunNowButton, ResourceScaleButton, SearchInput, SuccessToast, TOAST_STYLE, TablePagination, TableSkeletonLoader, TableSkeletonRow, TimezoneSelect, TruncatedText, renderErrorToast, renderSuccessToast } from './chunk-KXTZEQEK.js';
3
3
  export { Badge, Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, ScrollArea, ScrollBar, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tooltip, TooltipContent, TooltipProvider, TooltipTrigger, buttonVariants, toast } from './chunk-NYDY6TL7.js';
4
4
  export { BREAKPOINTS, useBreakpoint, useMediaQuery } from './chunk-XLB44BWQ.js';
5
5
  export { useCopyToClipboard } from './chunk-3ZL7QROP.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@litelens/design-system",
3
- "version": "1.7.16",
3
+ "version": "1.8.0",
4
4
  "description": "Design system components, utilities, and hooks for litelens",
5
5
  "private": false,
6
6
  "repository": {
@@ -51,7 +51,7 @@
51
51
  "@fontsource-variable/space-grotesk": "^5.3.0",
52
52
  "class-variance-authority": "^0.7.1",
53
53
  "clsx": "^2.1.1",
54
- "lucide-react": "^1.42.0",
54
+ "lucide-react": "^1.43.0",
55
55
  "next-themes": "^0.4.6",
56
56
  "react-markdown": "^10.1.0",
57
57
  "remark-gfm": "^4.0.1",